Closed veej closed 5 years ago
My proposal is a bit more radical:
remove parametricity from DatePicker
and use Date
as input (value
, defaultValue
) and output (onChange
). We can keep using moment internally, since react-dates uses it
remove returnFormat
: it seems a mix of concerns, the DatePicker should consume and yield values, whereas the presentation of those values should be handled separately
remove onClear
and just return onChange(value: Date | null)
I'm not sure of what's the value of having onClear
and it complicates the logic (especially in the date range picker I'm working on)
@gabro is proposing to remove
returnFormat
(andT
s other thanDate
) completelyOriginally posted by @giogonzo in https://github.com/buildo/react-components/pull/1333