Implement min and max dates in ClayDatePicker
#5241
Labels
comp: clay-components
Issues related to Clay components. (e.g ClayCard, ClayLabel...)
rfc
Similar to the RFC that are used in React.js, Ember.js, Gatsby.js and Rust, but to mark problems tha
What is your proposal?
Two new props for
ClayDatePicker
,min
andmax
. These would be equivalents of min and max attributes of<input type="date">
. Input of dates beyond this range would be disabled.Why would adopting this proposal be beneficial?
We are using date input restriction in DXP, in commerce orders.
max
date is set to current date. There, we are using native date input, implemented in FDSDateRangeFilter
. We would like to:DateRangeFilter
withClayDatePicker
, because Clay date & time picker has very nice UX, has consistent l&f in browsers, and has consistent l&f with other Clay components in DXP.But, this would not be possible, without losing the min / max feature.
What are the alternatives to this proposal?
None from the perspective of Clay, we can choose not to implement this. For DXP, we can keep using native date picker, adding only
ClayTimePicker
for time./cc @dsanz @ugeortiz
The text was updated successfully, but these errors were encountered: