@tidbcloud/uikit 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -243,10 +243,10 @@ const TimePicker = ({
|
|
|
243
243
|
...rest
|
|
244
244
|
}) => {
|
|
245
245
|
const [currentValue, setCurrentValue] = useUncontrolled.useUncontrolled({
|
|
246
|
-
value: value ? dayjs.dayjs(value) : void 0,
|
|
247
|
-
defaultValue: defaultValue ? dayjs.dayjs(defaultValue) : dayjs.dayjs(),
|
|
246
|
+
value: value ? dayjs.dayjs(value, "HH:mm:ss") : void 0,
|
|
247
|
+
defaultValue: defaultValue ? dayjs.dayjs(defaultValue, "HH:mm:ss") : dayjs.dayjs(),
|
|
248
248
|
onChange: (v) => {
|
|
249
|
-
onChange == null ? void 0 : onChange(v.
|
|
249
|
+
onChange == null ? void 0 : onChange(v.format("HH:mm:ss"));
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
252
|
const [currentValueChangedBy, setCurrentValueChangedBy] = React.useState(null);
|
|
@@ -15,9 +15,12 @@ export interface DateTimePickerProps extends Omit<TextInputProps, 'value' | 'onC
|
|
|
15
15
|
}
|
|
16
16
|
export declare const DateTimePicker: ({ placeholder, format, defaultValue, value, startDate, endDate, onChange, disable, utcOffset, withinPortal, sx, loading, size }: DateTimePickerProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
17
17
|
export interface TimePickerProps extends Omit<TimeInputProps, 'value' | 'onChange' | 'defaultValue'>, Pick<PopoverProps, 'withinPortal' | 'withArrow' | 'position' | 'shadow'> {
|
|
18
|
-
defaultValue?:
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
/**
|
|
20
|
+
* with format of `HH:mm:ss`
|
|
21
|
+
*/
|
|
22
|
+
value?: string;
|
|
23
|
+
onChange?: (val: string) => void;
|
|
21
24
|
disable?: boolean;
|
|
22
25
|
size?: MantineSize;
|
|
23
26
|
}
|
|
@@ -15,9 +15,12 @@ export interface DateTimePickerProps extends Omit<TextInputProps, 'value' | 'onC
|
|
|
15
15
|
}
|
|
16
16
|
export declare const DateTimePicker: ({ placeholder, format, defaultValue, value, startDate, endDate, onChange, disable, utcOffset, withinPortal, sx, loading, size }: DateTimePickerProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
17
17
|
export interface TimePickerProps extends Omit<TimeInputProps, 'value' | 'onChange' | 'defaultValue'>, Pick<PopoverProps, 'withinPortal' | 'withArrow' | 'position' | 'shadow'> {
|
|
18
|
-
defaultValue?:
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
/**
|
|
20
|
+
* with format of `HH:mm:ss`
|
|
21
|
+
*/
|
|
22
|
+
value?: string;
|
|
23
|
+
onChange?: (val: string) => void;
|
|
21
24
|
disable?: boolean;
|
|
22
25
|
size?: MantineSize;
|
|
23
26
|
}
|
|
@@ -241,10 +241,10 @@ const TimePicker = ({
|
|
|
241
241
|
...rest
|
|
242
242
|
}) => {
|
|
243
243
|
const [currentValue, setCurrentValue] = useUncontrolled({
|
|
244
|
-
value: value ? dayjs(value) : void 0,
|
|
245
|
-
defaultValue: defaultValue ? dayjs(defaultValue) : dayjs(),
|
|
244
|
+
value: value ? dayjs(value, "HH:mm:ss") : void 0,
|
|
245
|
+
defaultValue: defaultValue ? dayjs(defaultValue, "HH:mm:ss") : dayjs(),
|
|
246
246
|
onChange: (v) => {
|
|
247
|
-
onChange == null ? void 0 : onChange(v.
|
|
247
|
+
onChange == null ? void 0 : onChange(v.format("HH:mm:ss"));
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
const [currentValueChangedBy, setCurrentValueChangedBy] = useState(null);
|