You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Report: Navigation Buttons Disabled When min Prop of DatePicker is in the Future
Description
When setting the min prop of the DatePicker component to a date in the future, the navigation buttons in the popup become disabled if the min date is outside the current month. This behavior occurs because the DatePicker does not allow navigating to months where all dates are earlier than the min value.
For example, if today's date is January 2025 and the min prop is set to March 12, 2025, the month navigation buttons are disabled. This prevents users from navigating to February, even though March can be reached afterward.
Steps to Reproduce
Import the DatePicker component from react-widgets.
Set the min prop to a date in the future (at least 2 months in future) (e.g., new Date(2025, 2, 12) for March 12, 2025).
Open the DatePicker popup.
Observe that the navigation buttons are disabled and navigation to the next month (February) is not possible.
Expected Behavior
The navigation buttons should remain enabled, allowing users to navigate to future months even if the min value is in the middle or later part of a month. For instance, users should be able to navigate from January to February and then to March, respecting the min date for selection.
Actual Behavior
The navigation buttons are disabled entirely, making it impossible to navigate to months where the min date is valid for selection.
Bug Report: Navigation Buttons Disabled When
min
Prop ofDatePicker
is in the FutureDescription
When setting the
min
prop of theDatePicker
component to a date in the future, the navigation buttons in the popup become disabled if themin
date is outside the current month. This behavior occurs because the DatePicker does not allow navigating to months where all dates are earlier than themin
value.For example, if today's date is January 2025 and the
min
prop is set to March 12, 2025, the month navigation buttons are disabled. This prevents users from navigating to February, even though March can be reached afterward.Steps to Reproduce
DatePicker
component fromreact-widgets
.min
prop to a date in the future (at least 2 months in future) (e.g.,new Date(2025, 2, 12)
for March 12, 2025).Expected Behavior
The navigation buttons should remain enabled, allowing users to navigate to future months even if the
min
value is in the middle or later part of a month. For instance, users should be able to navigate from January to February and then to March, respecting themin
date for selection.Actual Behavior
The navigation buttons are disabled entirely, making it impossible to navigate to months where the
min
date is valid for selection.Code Example
The text was updated successfully, but these errors were encountered: