Open spilist opened 2 months ago
@spilist I think you can use Date-range-picker component for this purpose. You can use useState
hook to set values as per user interaction. I believe it should solve your feature need.
Or developing this feature requires team permission I will confirm you soon
Is your feature request related to a problem? Please describe.
In
DateRangePicker
, I wanted to make it possible to select only up to 2 weeks before and after when a user clicks a date inside Calendar UI.Describe the solution you'd like
When an event handler, say
onDateSelected
, is called when a user clicks a date inside Calendar, I can dynamically changemaxValue
andminValue
props of DateRangePicker.Describe alternatives you've considered
maxValue
as number. A positive number can be given to these props only whenisMaxValueRelative
prop is true. For example, if30
is set tomaxValue
, DateRangePicker only permits date from the selected date to "30 days after the selected date". Same forminValue
.Screenshots or Videos
No response