forked from ddrilling/asb_cloud_front
Аргументы селектора даты изменены на необязательные
This commit is contained in:
parent
d6c4261d26
commit
f4a3c0f293
@ -6,8 +6,8 @@ import moment, { Moment } from 'moment'
|
||||
import { defaultFormat } from '@utils'
|
||||
|
||||
export type DatePickerWrapperProps = PickerDateProps<Moment> & {
|
||||
value: Moment,
|
||||
onChange: (date: Moment | null) => any
|
||||
value?: Moment,
|
||||
onChange?: (date: Moment | null) => any
|
||||
isUTC?: boolean
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ export const DatePickerWrapper = memo<DatePickerWrapperProps>(({ 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}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user