InputDateRange allows you to set the date format for displaying the date range in a specified format. You can use Format property of the InputDateRange class to set the standard date format or any other date format of your choice for the InputDateRange control.
The following code showcases the use of Format property to set "dd-MMM-yy" date format for the displayed date range in the control.
Index.cshtml |
Copy Code
|
---|---|
@{ var today = DateTime.Now.Date; var rangeEnd = today.AddDays(4); } <c1-input-date-range id="demoControl" value="@today" range-end="@rangeEnd" format="dd-MMM-yy"> </c1-input-date-range> |