# Selecting the Edit Mode

## Content



By default, the C1DateTimePicker control shows both the date and time pickers, but you may also choose to show only the date picker or only the time picker. In this topic, you will learn how to change the editor mode in the designer, in XAML, and in code.

**In the Designer**

To change the edit mode, complete the following steps:

1.  Click the **C1DateTimePicker** control once to select it.
2.  In the **Properties** window, click the <span data-popup-content="This class is available in \u003ca href=\u0022/componentone/api/wpf/online-datetimeeditors/dotnet-api/C1.WPF.DateTimeEditors/C1.WPF.DateTimeEditors.C1DateTimePicker.EditMode.html\u0022\u003e.NET 5 Core\u003c/a\u003e and \u003ca href=\u0022/componentone/api/wpf/online-datetimeeditors/dotnet-api/C1.WPF.DateTimeEditors/C1.WPF.DateTimeEditors.C1DateTimePicker.EditMode.html\u0022\u003e.NET Framework\u003c/a\u003e." data-popup-title="C1DateTimePicker.EditMode" data-popup-theme="ui-tooltip-green qtip-green">C1DateTimePicker.EditMode</span> drop-down arrow and select a mode from the list. For this example, select **Date**.

**In XAML**

To change the edit mode, place **EditMode="Date"** to the _<my:C1DateTimePicker>_ tag so that the markup resembles the following:

```auto
<my:C1DateTimePicker EditMode="Date">
```

**In Code**

To change the edit mode, complete the following steps:

1.  Open the **Window1.xaml.cs** page.
2.  Import the following namespace:
    
    ```vbnet
    Imports C1.WPF.DateTimeEditors
    ```
    
    ```csharp
    using C1.WPF.DateTimeEditors;
    ```
    
3.  Place the following code beneath the **InitializeComponent()** method:
    
    ```vbnet
    C1DateTimePicker1.EditMode = C1DateTimePickerEditMode.Date
    ```
    
    ```csharp
    c1DateTimePicker1.EditMode = C1DateTimePickerEditMode.Date;
    ```
    
4.  Run the project.

**This Topic Illustrates the Following**:

In this topic, you set the C1DateTimePicker.EditMode to **Date**, which removes the time picker form the **C1DateTimePicker** control. The result of this topic will resemble the following image:

![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/c1datetimepicker_graphics/tbh/seteditormode_final.png)