Skip to content
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
Open
@alexbeletsky

Description

@alexbeletsky

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions