Enums: Date

Control date input behavior with explicit modes.

Date enums help you guide user input by selecting the most appropriate mode for your date fields.

How it works

Set DateInputMode on date inputs to hint the expected input format to browsers and device keyboards.

Examples

  • DateInputMode.Date for date-only fields like birthdays.
  • DateInputMode.DateTime for scheduling date and time together.
  • DateInputMode.Month for month-based reporting filters.

Reference

DateInputMode

Hints at the type of data that might be entered by the user while editing the date input.

  • DateInputMode.Date Only date is allowed to be entered.
  • DateInputMode.DateTime Both date and time are allowed to be entered.
  • DateInputMode.Month Allowed to select only year and month. Note that not all browser supports this mode
On this page