Change Theme Settings
Change Theme Settings
Show All Themes

Date Edit in Date Range mode


Validation settings for the Model's "End" property:
DateRangeAttribute.MinDayCount = 1;
DateRangeAttribute.MaxDayCount = 30

Two DevExpress ASP.NET MVC Date Edit extensions can be combined to introduce date range selection capabilities in your web application. One editor is used to specify the start date, another – to specify the end date. To link editors, decorate the end-date editor's model field with the DateRange attribute and set the StartDateEditFieldName property of the attribute to the field name of the start-date editor.

You can customize the date range settings using the following attribute properties.

  • MinDayCount - specifies the minimum number of days in a range.
  • MaxDayCount - specifies the maximum number of days in a range.

If the number of days in the specified range exceeds the specified range limits, an error message is displayed when the Submit button is clicked.