Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Date Range Picker

v
v
Submit
Options
+
-
+
-

Two DevExpress ASP.NET Date Edit controls (ASPxDateEdit) 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, set the StartDateEditID property of the end-date editor to the ID value of the start-date editor.

You can customize date range settings using the DateRangeSettings property, which provides access to the following properties:

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

Note: Date range settings should be specified for the end-date editor.

In this demo, the client-side GetRangeDayCount method is used in the DateChanged event handler to calculate the number of days in a specified range. If the number of days in the specified range exceeds specified range limits, an error message is displayed when the Submit button is clicked.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxEditorsDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxEditorsDemos