# Quick Start

## Content



The following quick start guide is intended to get you up and running with the InputDateRange control. In this quick start, you start with creating a new application, add the **InputDateRange** control to it, set its value and display a date range in it. When you click the drop-down button to open the calendar, the InputDateRange control shows two calendar months, by default. However, you can change the month count displayed in the control as per your requirements. For more information on changing the number of months displayed in the InputDateRange control, see [Date Range](/componentone/docs/mvc/online-mvc-core/WorkingwithControls/Input/inputdaterange/inputdaterange-date-range) topic.

![](https://cdn.mescius.io/document-site-files/images/9b6a6cfe-b8e8-42e9-8a04-da6cb7762977/images/simple-inputdaterange.png)

To accomplish this, follow these steps:

## Create an MVC Application

Create a new MVC application using the ComponentOne or VisualStudio templates. For more information about creating an MVC application, see [Configuring your MVC Application](/componentone/docs/mvc/online-mvc-core/Configuring-your-MVC-Application) topic.

## Add InputDateRange

To add the InputDateRange control to your application, add **C1.Web.MVC** reference and follow these steps:

### **Add a new Controller**

1.  In the **Solution Explorer**, right click the folder **Controllers.**
2.  From the context menu, select **Add | Controller**. The **Add New Scaffold Item** dialog appears.
3.  In the **Add New Scaffold Item** dialog, follow these steps:
    1.  Select the **MVC 5 Controller - Empty** template.
    2.  Click **Add**. The **Add Controller** dialog appears.
    3.  In the **Add Controller** dialog, set name of the controller (for example: `InputDateRangeController`).
    4.  Click **Add**.

### **Add a View for the Controller**

1.  From the **Solution Explorer**, expand the folder **Controllers** and double click the `InputDateRange`Controller`.`
2.  Place the cursor inside the method `Index()`.
3.  Right click and select **Add View**. The **Add View** dialog appears.
4.  In the **Add View** dialog, verify that the View name is **Index** and View engine is **Razor (CSHTML).**
5.  Click **Add** to add a view for the controller. Copy the following code and paste it inside **Index.cshtml** to create a simple application with the InputDate control.
    
    ```razor
    @{
        var today = DateTime.Now.Date;
        var rangeEnd = today.AddDays(4);
    }
    <c1-input-date-range id="demoControl" value="@today" range-end="@rangeEnd">
    </c1-input-date-range>
    ```
    

## Build and Run the Project

1.  Click **Build | Build Solution** to build the project.
2.  Press **F5** to run the project. 
	> type=note
	> Append the folder name and view name to the generated URL (for example: http://localhost:1234/InputDateRange/Index) in the address bar of the browser to see the view.