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'
|
import { defaultFormat } from '@utils'
|
||||||
|
|
||||||
export type DatePickerWrapperProps = PickerDateProps<Moment> & {
|
export type DatePickerWrapperProps = PickerDateProps<Moment> & {
|
||||||
value: Moment,
|
value?: Moment,
|
||||||
onChange: (date: Moment | null) => any
|
onChange?: (date: Moment | null) => any
|
||||||
isUTC?: boolean
|
isUTC?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ export const DatePickerWrapper = memo<DatePickerWrapperProps>(({ value, onChange
|
|||||||
allowClear={false}
|
allowClear={false}
|
||||||
format={defaultFormat}
|
format={defaultFormat}
|
||||||
defaultValue={moment()}
|
defaultValue={moment()}
|
||||||
onChange={(date) => onChange(date)}
|
onChange={(date) => onChange?.(date)}
|
||||||
value={isUTC ? moment.utc(value).local() : moment(value)}
|
value={isUTC ? moment.utc(value).local() : moment(value)}
|
||||||
{...other}
|
{...other}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user