Skip to main content
A newer version of this page is available. .

TimeEdit Class

The editor to edit time values using spin buttons or dropdown calendar.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v18.1.dll

Declaration

[ToolboxTabName("DX.18.1: Common Controls")]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "TimeEdit")]
public class TimeEdit :
    BaseSpinEdit

The following members accept/return TimeEdit objects:

Remarks

The TimeEdit class represents an editor which allows editing DateTime values (if you need to edit TimeSpan values, use the TimeSpanEdit editor instead). The TimeEdit.Properties property of the RepositoryItemTimeEdit type provides properties specific to time editors. It allows you to define both time and hour formats and specify the editor’s behavior and appearance.

The default time editing mode allows an end-user to type time directly within the edit box and use spin buttons to increment or decrement time values (hours, minutes or seconds):

TimeEdit

Horizontal and vertical orientations of spin buttons are supported. Use the RepositoryItemBaseSpinEdit.SpinStyle property (accessible via the TimeEdit.Properties object) to change the spin button orientation.

In addition to the default time editing mode, the TimeEdit control provides the Touch-aware time-editing UI in which the control provides a dropdown Touch-aware panel for editing time using scrollable tiles:

TimeEdit - TimeEditStyle TouchUI

You can switch to this mode using the RepositoryItemTimeEdit.TimeEditStyle property.

To specify a time value in code, use the TimeEdit.Time property. To customize the format in which an end-user will edit data, use the MaskProperties.EditMask property of the RepositoryItemTextEdit.Mask inherited object.

The following code snippets (auto-collected from DevExpress Examples) contain references to the TimeEdit class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also