DateTime Picker / Validation

Blazor DateTimePicker Example - Validation

Loading Syncfusion Blazor Server Demos…

This sample demonstrates form validation using Data Annotations with the DateTimePicker component. Type the date and time in the input element or choose a date from the calendar popup and time from the timepicker popup. If the input value is valid, the form is ready to submit. Otherwise, an error message will be displayed.

The form enables validation with data annotation attributes by clicking the submit button externally. All validation rules are processed by the DataAnnotationsValidator.

Validation rules configured:

  • Required: The field must have a valid date and time value
  • Range: The date and time must fall within the specified range (5 March 2021, 9:00 AM to 25 March 2021, 6:00 PM)
Transform your Blazor web apps today with Syncfusion® Blazor components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE