diff --git a/packages/zarm/src/date-picker/demo.md b/packages/zarm/src/date-picker/demo.md index c07b8e9e8..f41a5df3b 100644 --- a/packages/zarm/src/date-picker/demo.md +++ b/packages/zarm/src/date-picker/demo.md @@ -270,8 +270,9 @@ const Demo = () => { > {console.log('DateSelect onChange', value, items); setValue(value);}} + onChange={(value, items) => {console.log('DateSelect onChange', value, items);}} onConfirm={(value, items) => { + setValue(value); Toast.show(value.toLocaleString()); console.log('DateSelect onConfirm', value, items); }} diff --git a/packages/zarm/src/date-select/DateSelect.tsx b/packages/zarm/src/date-select/DateSelect.tsx index 097a9998b..3d3add8f1 100644 --- a/packages/zarm/src/date-select/DateSelect.tsx +++ b/packages/zarm/src/date-select/DateSelect.tsx @@ -37,7 +37,6 @@ const DateSelect: React.FC = (props) => { filter, renderLabel, displayRender = (items) => items?.map((item) => item && item.label), - onChange, onCancel, onConfirm, ...rest @@ -67,7 +66,6 @@ const DateSelect: React.FC = (props) => { }); onConfirm?.(changedValue, changedItems); - onChange?.(changedValue, changedItems); }; const handleCancel = () => { diff --git a/packages/zarm/src/date-select/interface.ts b/packages/zarm/src/date-select/interface.ts index 9137dc846..be1ec3151 100644 --- a/packages/zarm/src/date-select/interface.ts +++ b/packages/zarm/src/date-select/interface.ts @@ -5,5 +5,4 @@ export interface BaseDateSelectProps extends Omit React.ReactNode; - onChange?: (value: Date, items: PickerColumnItem[]) => void; }