-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pickers][DateRangePicker] Separately disable start and end date picking #13558
Comments
Hello @kbrueckner, have you tried using the It receives the (day, position) => {
if (value[0] && position === 'start' && day.isBefore(value[0])) {
return true;
}
return false;
} |
Yes, I considered that and tried a lot of things with different provided attributes of DateRangePicker. The one you suggested - if I am not mistaking - would simply disable a specific date in the calendar but it does not prevent from setting the from date to another date which is not disabled. |
Do you mean setting the date in the input? If not, it seems like you are talking about the following requirement: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date (year is disabled in input given present validation rules). |
Summary
I am looking for a feature where it is possible to freeze selected values for start and end date. Means a start or end date cannot be changed. This shall be possible independently, thus disable on DAteRangePicker itself wouldn ot work, since it disabled edition completely for start and end date at the same time.
Examples
No response
Motivation
In some projects I have the following use case:
Definition of settings which apply to a selected date range. Once the start date of the range is reached or in the past it shall not be possible to update the start date anymore while the end date shall still be editable until that one is in the past as well.
Search keywords: daterangepicker disable
The text was updated successfully, but these errors were encountered: