# Quick Start

## Content

The quick start guides you through the steps of adding an InputDateTime control to your application. For more information on how to add ASP.NET MVC Edition controls, see [Adding Controls](/componentone/docs/mvc/online-mvc-core/Adding-Controls).
Follow the steps given below to get started:
![](https://cdn.mescius.io/document-site-files/images/9b6a6cfe-b8e8-42e9-8a04-da6cb7762977/images/inputdatetimeqs.png)

### 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 a new Controller and View

**Add a new Controller**:

1. In the **Solution Explorer**, right click the folder **Controllers.**
2. From the context menu, select **Add \| Controller**. The **Add Scaffold** dialog appears.
3. Complete the following steps in the **Add Scaffold** dialog:
    1. Select **Empty MVC Controller** template.
    2. Set name of the controller (for example: `Default1Controller`).
    3. Click **Add**.
4. A new controller is added to the application.

**Add a View for the controller**:

1. Place the cursor inside the method `Index()`.
2. Right click and select **Add View**. The **Add View** dialog appears.
3. In the **Add View** dialog, verify that the View name is **Index** and View engine is **Razor (CSHTML).**
4. Click **Add** to add a view for the controller.

### Add the Control

1. Replace the default code of the `Index.cshtml` file with the code given below to initialize an **InputDateTime** control.

    ```razor
    @{
      var today = DateTime.Now.Date;
      var minDate = new DateTime(today.Year, 1, 1);
      var maxDate = new DateTime(today.Year, 12, 31);
    }
    <div> <label> Select a date </label>
            <c1-input-datetime id="idtInputDateTime" value="@today" min="@minDate" max="@maxDate"></c1-input- datetime>
    </div>
    ```

### 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/**Index/index**) in the address bar of the browser to see the view or link the view to the home page.