From f4a3c0f293ebea47e0f99cf26c8f216a304a740d Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Wed, 16 Mar 2022 16:10:28 +0500 Subject: [PATCH] =?UTF-8?q?=D0=90=D1=80=D0=B3=D1=83=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D1=8B=20=D1=81=D0=B5=D0=BB=D0=B5=D0=BA=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=B0=D1=82=D1=8B=20=D0=B8=D0=B7=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=B0=20=D0=BD=D0=B5=D0=BE?= =?UTF-8?q?=D0=B1=D1=8F=D0=B7=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/DatePickerWrapper.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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} />