• Material 3
  • Material 3 Dark
  • Fluent
  • Fluent Dark
  • Bootstrap v5
  • Bootstrap v5 Dark
  • Tailwind CSS
  • Tailwind CSS Dark
  • Material
  • Bootstrap v4
  • High Contrast
Preferences
Theme Selection
Mode Selection
Touch
Mouse
Localization
*Translated by Google Translator.
Currency

Example of DatePickerFor in ASP.NET MVC DatePicker Control

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

DEMO
SOURCE

This sample demonstrates the strongly typed extension support in DatePicker. Date value is set to DatePicker from code behind and its set to DatePicker in view page by invoking the strongly typed DatePickerFor helper with the lamba expression.

More information on the DatePicker instantiation can be found in the documentation section.