diff --git a/src/components/Table/DatePickerWrapper.tsx b/src/components/Table/DatePickerWrapper.tsx index 76b195b..a453fbc 100644 --- a/src/components/Table/DatePickerWrapper.tsx +++ b/src/components/Table/DatePickerWrapper.tsx @@ -6,8 +6,8 @@ import moment, { Moment } from 'moment' import { defaultFormat } from '@utils' export type DatePickerWrapperProps = PickerDateProps & { - value: Moment, - onChange: (date: Moment | null) => any + value?: Moment, + onChange?: (date: Moment | null) => any isUTC?: boolean } @@ -17,7 +17,7 @@ export const DatePickerWrapper = memo(({ value, onChange allowClear={false} format={defaultFormat} defaultValue={moment()} - onChange={(date) => onChange(date)} + onChange={(date) => onChange?.(date)} value={isUTC ? moment.utc(value).local() : moment(value)} {...other} />