Blazor | ComponentOne
Controls / DateTime Editors / DateRangePicker / Display Modes
In This Topic
    Display Modes
    In This Topic

    DateRangePicker control allows you to control its editability and state. This can be useful in the scenarios where you want limit the user from modifying the control value until some other conditions have been met, like selecting a radio button or a checkbox. Let us explore more about these modes in the following sections.

    Disabled Mode

    You can keep the DateRangePicker control in deactivated state by setting the IsEnabled property to false. This allows you to inactivate the DateRangePicker control and limit any modifications.

    Disabled DateRangePicker

    To disable the DateRangePicker control using the IsEnabled property, use the following code:

    Index.razor
    Copy Code
    <C1DateRangePicker Placeholder="Select a date range" IsEnabled="false"></C1DateRangePicker>
    

    ReadOnly Mode

    DateRangePicker provides the IsReadOnly property which lets you choose whether to allow the user to modify the control value with the mouse and keyboard at runtime. To make the DateRangePicker control non-editable, set the IsReadOnly property to true, as shown in the following code:

    Index.razor
    Copy Code
    <C1DateRangePicker Placeholder="Non-Editable DateRangePicker" IsReadOnly="true"></C1DateRangePicker>