Skip to content

Commit 5cf4234

Browse files
committed
fix: Time format should not affect by Datetime format
1 parent 77e9e1b commit 5cf4234

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

examples/basic.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,12 @@ export default () => {
134134
</div>
135135
<div style={{ margin: '0 8px' }}>
136136
<h3>Uncontrolled Datetime</h3>
137-
<Picker<Moment> generateConfig={momentGenerateConfig} locale={zhCN} />
137+
<Picker<Moment>
138+
format="YYYY-MM-DD HH:mm:ss"
139+
generateConfig={momentGenerateConfig}
140+
locale={enUS}
141+
showTime
142+
/>
138143
</div>
139144
<div style={{ margin: '0 8px' }}>
140145
<h3>Week</h3>

src/panels/DatetimePanel/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ function DatetimePanel<DateType>(props: DatetimePanelProps<DateType>) {
153153
/>
154154
<TimePanel
155155
{...props}
156+
format={undefined}
156157
{...timeProps}
157158
{...disabledTimes}
158159
defaultValue={undefined}

0 commit comments

Comments
 (0)