RepositoryItemDateEdit.CalendarDateEditing Property
Gets or sets whether an end-user can select a date in the dropdown calendar. Disable this setting to allow end-users to enter only the time portions of date-time values (see RepositoryItemDateEdit.CalendarTimeEditing).
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v22.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[DefaultValue(true)]
[DXCategory("Behavior")]
public bool CalendarDateEditing { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | true | true if an end-user can select a date in the calendar; otherwise, false. |
Remarks
The RepositoryItemDateEdit.CalendarTimeEditing property can be set to a value that enables a time edit box and clock face in the dropdown window. The time edit box allows an end-user to enter the time portions of date-time values.
If the CalendarDateEditing property is disabled, the dropdown window does not provide a calendar to select a date from. Only the time edit box and clock face (if they are enabled) are available in the dropdown.
The CalendarDateEditing and RepositoryItemDateEdit.CalendarTimeEditing properties do not affect the presentation and input pattern of a date-time value in the edit box.
You can use the date editor’s RepositoryItemTextEdit.Mask inherited property to specify the format in which a date-time value is entered and presented in the edit box. For instance, setting the Mask.EditMask property to “g” enables end-users to enter date-time values using the general date-time pattern (e.g., “5/24/2016 12:08 AM”), regardless of the CalendarDateEditing and RepositoryItemDateEdit.CalendarTimeEditing properties. Thus, if you’d like to allow an end-user to only enter a time portion of a date-time value in the edit box and dropdown calendar, set the CalendarDateEditing property to false, CalendarTimeEditing to true and Mask.EditMask to “t” or “T” (these masks apply the short and long time patterns, respectively).