This repository was archived by the owner on Oct 27, 2022. It is now read-only.
This repository was archived by the owner on Oct 27, 2022. It is now read-only.
DatePicker interface #34
Open
Description
I do not understand why date picker takes value
and defaultValue
as strings, but onChange
method outputs moment
object.
Also, we need to format value
and defaultValue
with a pattern and when submit this pattern to control itself.
<DatePicker value={moment(value).format('DD/MM/YYYY')} pattern={'DD/MM/YYYY'} />
Internally it's transformed to moment
, which again forces me to ask - why not just taking a moment in a first place?
- value -
moment
object - pattern - data format pattern used to render date in input control
- onChange(date) - returns
moment
object
Metadata
Metadata
Assignees
Labels
No labels