Skip to content

[MaterialDatePicker] Permission to select only an interval when it is not known in advance which start date the user will select #2957

Open
@Turalllb

Description

@Turalllb

Permission to select only the interval, for example no more than 10 days. That is, I do not know which start date the user will choose, after he has selected the start date, then all other dates greater than Start date + interval should be unavailable. And we also need exactly the inverse function, when it is impossible to choose an interval smaller than the specified one. For example, it cannot be less than 5 days, then after selecting the start date, the next 4 days will become unavailable for selection. CalendarConstraints.DateValidator doesn't allow you to create such conditions because I don't know the start date the user will select.

How I see this feature: The programmer creates a DatePicker and sets the duration of the period that can be selected, for example 10 days. The user opens the DatePicker and any date is available for him to select, he selects the first date and the restriction is applied, dates from the selected one and 9 more days remain available for selection. You can add different variations of this function: 1) when the range is exactly 10 days 2) when you can choose a range that is not more than 10 days, but you can choose less. 3) when you can choose more than 10, but not less

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions