This is a migrated thread and some comments may be shown as answers.

Grid Filter Date Minimum

1 Answer 132 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marv
Top achievements
Rank 1
Marv asked on 26 Aug 2016, 07:17 PM
We are using ASP.NET MVC and have a grid with a date column which as a filter. The date filter has datepickers. In the filter datepickers, is there a way to prevent the user from selecting some minimum date (like two years ago).

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 30 Aug 2016, 05:33 PM
Hello,

You could use the filterMenuInit event to get reference to the DatePicker widgets of the filter menu and to set the desired min value:
function filterMenuInit(e) {                        
  e.container.find("[data-role=datepicker]").kendoDatePicker("setOptions", {
    min: new Date(............)
  });
}

Note that the DatePicker will set the value only if the entered date is valid and within the defined range.

Regards,
Pavlina
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Marv
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or