The Blazor DatePicker component enables the user select and enter only a valid date from a calendar panel that conforms to the specified format, culture, min and max settings. The DatePicker works in both (WASM) and Server-side Blazor apps and also supports forms validation, keyboard navigation and provides events.
The user is presented with a calendar popup they can use to navigate in a visual manner to choose the desired date.
Check out the Blazor DatePicker demo
Form validation through DataAnnotation attributes comes out-of-the-box with the Telerik Blazor Date Picker.
The DatePicker comes with validation modes which allow you to configure whether to trigger validation on change, blur or while typing, which let’s set the right one for a particular use case.
Using the <HeaderTemplate> you can add custom buttons or render your own content in the Blazor DatePicker header.
If there are dates the user must not pick, because they are a bank holiday or otherwise a special day, you can disable them by providing a simple list of them to the Telerik DatePicker.
The Telerik Blazor DatePicker restricts input to the format specified by the developer. This ensures a valid date, and full control over the display.
You can choose from the standard .NET format specifiers, and to also write your own – just like you would with any C# code.
The DatePicker allows you to simply configure popups from a single tag. In addition to that, the Open and Close methods allow you to toggle the popup visibility without triggering the OnOpen/OnClose events.
The DatePicker offers the standard ValueChanged event and also an OnChange event that still lets you react to the user choosing a new date, but does not prevent two-way binding.
The Telerik DatePicker automatically carries culture-aware formats to the client so users see the dates they are used to – for example, if you set the format to “d” people in the US can see MM/dd/yyyy while people in the UK can see dd/MM/yyyy. Days of the week and button texts are easily translatable to any language.
Example of Telerik UI for Blazor DatePicker Globalization
The Telerik DatePicker component honors web accessibility standards (WCAG, Section 508 and WAI-ARIA attributes for screen readers) and lets you enter values with the keyboard only – not only by typing, but also by pressing the arrow keys, which includes navigation in the calendar popup as well – all without ever touching the mouse.
The Telerik Blazor DatePicker has several built-in themes such as Default (our own styling), Material (based on the Material Design guidelines) and Bootstrap (which looks like the Bootstrap styling to integrate better). You can easily customize any of out-of-the-box themes with a few lines of CSS, or create new theme to match your colors and branding by using the Telerik SASS ThemeBuilder application.