react-widgets
react-widgets copied to clipboard
Fix navigation when value is outside allowed range
React widgets v5 example below where this is also an issue:
<DatePicker
min={new Date(2021,10,30)}
defaultValue={new Date(2021, 5, 20)}
/>;
We are however using V4 and its time picker and would appreciate if this can get patched there as well without having to create a fork. In short, when value is outside the range of min and max, you cannot navigate to other months until the value is within the range. The check inside componentDidMount will always fail and set current date back to to the min or max.
I believe this code was somewhat ported to V5 here: https://github.com/jquense/react-widgets/blob/master/packages/react-widgets/src/Calendar.tsx#L377-L385 and a similar change would suffice.