# Display Modes

Develop powerful and lightweight web applications using ASP.NET MVC controls. Learn more about the ComponentOne MVC controls in ASP.NET MVC documentation.

## Content



InputDateRange 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 InputDateRange control in deactivated state using the **IsDisabled** property. This allows you to inactivate the InputDateRange control and limit any modifications.

![](https://cdn.mescius.io/document-site-files/images/2b3ac322-100e-4637-958d-fb40dcda3f44/images/daterange-disablemode.png)

To disable the InputDaterange control using the **IsDisabled** property, use the following code:

```razor
@{
    var today = DateTime.Now.Date;
    var rangeEnd = today.AddDays(4);
}
@(Html.C1().InputDateRange().Id("demoControl")
        .Value(today)
        .RangeEnd(rangeEnd)
        .IsDisabled(true)
)
```

## ReadOnly Mode

InputDateRange 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 InputDateRange control non-editable using the **IsReadOnly** property, use the following code:

```razor
@{
    var today = DateTime.Now.Date;
    var rangeEnd = today.AddDays(4);
}
@(Html.C1().InputDateRange().Id("demoControl")
        .Value(today)
        .RangeEnd(rangeEnd)
        .IsReadOnly(true)
)
```