RadzenDatePicker: would like Min and Max parameters #232

Closed
opened 2026-01-29 17:33:54 +00:00 by claunia · 1 comment
Owner

Originally created by @szalapski on GitHub (Oct 22, 2021).

Is your feature request related to a problem? Please describe.
The native HTML date picker accepts a Min and Max attributes that let us narrow the range of dates the user may pick from. It would be nice if RadzenDatePicker had similar parameters.

Describe the solution you'd like
Can we get the equivalent Min and Max parameters on RadzenDatePicker? Dates before the min or after the max could not be picked and would appear visually disabled (greyed-out or similar)

Describe alternatives you've considered
YearRange is close but it would be nice to have it at the date level; likewise would want to be able to set Min and not Max or set Max and not Min, etc.

Originally created by @szalapski on GitHub (Oct 22, 2021). **Is your feature request related to a problem? Please describe.** The native HTML date picker accepts a Min and Max attributes that let us narrow the range of dates the user may pick from. It would be nice if RadzenDatePicker had similar parameters. **Describe the solution you'd like** Can we get the equivalent Min and Max parameters on RadzenDatePicker? Dates before the min or after the max could not be picked and would appear visually disabled (greyed-out or similar) **Describe alternatives you've considered** YearRange is close but it would be nice to have it at the date level; likewise would want to be able to set Min and not Max or set Max and not Min, etc.
Author
Owner

@enchev commented on GitHub (Dec 2, 2021):

Hey @szalapski,

Using DateRender event you can disable any date based of your logic. Check DatePicker with disabled dates in
our demo for reference. For example:

    void DateRender(DateRenderEventArgs args)
    {
        args.Disabled = args.Date <= dates.FirstOrDefault() || args.Date >= dates.LastOrDefault();
    }

image

@enchev commented on GitHub (Dec 2, 2021): Hey @szalapski, Using `DateRender` event you can disable any date based of your logic. Check *DatePicker with disabled dates* in [our demo](https://blazor.radzen.com/datepicker) for reference. For example: ``` void DateRender(DateRenderEventArgs args) { args.Disabled = args.Date <= dates.FirstOrDefault() || args.Date >= dates.LastOrDefault(); } ``` ![image](https://user-images.githubusercontent.com/5804953/144388220-7639e5d1-12d0-4d06-a462-c07ec4643a81.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#232