Disable the Blazor DateTimePicker Component

4 Nov 20251 minute to read

To disable the DateTimePicker, set its Enabled property to false. When disabled, the input cannot receive focus, typing is blocked, and the popup cannot be opened. The default value of Enabled is true, and this property can be data-bound to toggle the disabled state at runtime.

The following code demonstrates the disabled component.

@using Syncfusion.Blazor.Calendars

<SfDateTimePicker TValue="DateTime?" Enabled=false Value='@DateTimeValue'></SfDateTimePicker>

@code {
    public DateTime? DateTimeValue { get; set; } = DateTime.Now;
}

Blazor DateTimePicker shown in a disabled state