# Editing Date and Time Values

Learn how to edit Date and Time values using C1Textbox.

## Content



[C1TextBox](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.html) supports a special editing mode called DateTimeInput mode that makes editing date and time values easier. This mode is enabled when [DataType](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.DataType.html) property is set to **DateTime** and [DateTimeInput](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.DateTimeInput.html) property is set to **True** (default). In the DateTimeInput mode, the currently selected date or time field, such as the year, month, date, and so on, is highlighted and edited separately. Formatted fields represented in string form, such as month or day of the week in LongDate format, can be typed as numbers on the keyboard, and their string representation is updated automatically. The UP ARROW/DOWN ARROW keys or mouse wheel can be used to increment/decrement the current field.

Additional properties controlling date-time input are:

| Property | Description |
| --- | --- |
| [MinShortYear](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.MinShortYear.html) | The minimum year that can be entered without leading zeros (when DateTimeInput is set to **True**). For example, if MinShortYear is set to **300** (default), entering 200 is not allowed (will be ignored), whereas 400 is interpreted as 0400 A.D. Regardless of this property value, entering 0200 will be interpreted as year 0200 A.D. |
| [CurrentTimeZone](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.CurrentTimeZone.html) | This property is **True** by default, which means that date-time values are invariant, not adjusted to time zones. If this property is set to **False**, the [Text](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.Text.html) shown to the user and the underlying stored [Value](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.Value.html) become different. The stored Value belongs to the time zone defined by the [GMTOffset](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.GMTOffset.html) property specifying the offset in hours and minutes of the base time zone from Greenwich Mean Time. The Text shown to the user belongs to the local time zone defined by the user computer settings. Displaying values and parsing values entered by the user, **C1Input** adjusts it to the time zone difference. |

To make editing date-time values even more convenient to the user, you can use the specialized [C1DateEdit](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1DateEdit.html) control. In addition to C1TextBox functionality, it supports a drop-down calendar and up/down buttons (speedbuttons) incrementing/decrementing the currently selected date-time field.

## See Also

[Editing Numeric Values](/componentone/docs/win/online-input/usingthec1inputcontr/editingnumericvalues)