Example of DateTimePickerFor in ASP.NET MVC DateTimePicker Control

Click/Touch the submit button to post the selected value in the DateTimePicker. When posting the null value, validation error message will be shown below the DateTimePicker.

DEMO
SOURCE

This sample demonstrates the strongly typed extension support in DateTimePicker. Value is set as model object to the DateTimePicker from the code behind, and its set to DateTimePicker in view page by invoking the strongly typed DateTimePickerFor helper with the lamba expression.

More information on the DatePicker instantiation can be found in the documentation sectionopens in a new tab.

Transform your ASP.NET MVC web apps today with Syncfusion® ASP.NET MVC components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab