DateTimeEditBox
The DateTimeEditBox control allows for the input of a DateTime value. It uses the DateTimePicker control in its popup.

Common Capabilities
Each of the features listed in the table below describe functionality that is common to most edit boxes. Please see the Edit Box Basics topic for details on each of these options and how to set them.
| Feature | Description |
|---|---|
| Has a spinner | Yes, and can be hidden or optionally displayed only when the control is active. |
| Has a popup | Yes, and can be hidden or its picker appearance customized. |
| Null value allowed | Yes, and can be prevented. |
| Read-only mode supported | Yes. |
| Non-editable mode supported | Yes. |
| Has multiple parts | Yes, and supports optional arrow key navigation. |
| Placeholder text supported | Yes, and overlays the control. |
| Header content supported | Yes, and appears above the control. |
| Default spin behavior | Wrap. |
Formats
Standard date/time formats are supported via the Format property and affect the textual value display. These formats are recommended:
"g""G""f""F""MM/dd/yyyy hh:mm tt""MM/dd/yy h:mm:ss tt""yyyy-MM-dd HH:mm:ss""d MMMM yyyy HH:mm""d MMM yyyy HH:mm""dd.MM.yyyy HH:mm""d.M.yyyy HH:mm"
Minimum and Maximum Values
Minimum and maximum values may be assigned via the Maximum and Minimum properties.
No values can be committed that lay outside of the inclusive range created by those properties.
Parts and Incrementing/Decrementing
This edit box has multiple parts:
- Year
- Month
- Day
When the caret is over a part, the part value may be incremented or decremented. Please see the Edit Box Basics topic for information on how to do this.
Parsing
When text is entered directly into the control, the value is initially parsed based on the current Format. If unsuccessful, additional date formats will be attempted.
The ParsingStyles property, which defaults to DateTimeStyles.AllowWhiteSpaces, can be used to provide additional control over how values are parsed, including options such as which time zone is applied when one is not specified.
Warning
When setting ParsingStyles to a new value, it is recommend to OR the value with DateTimeStyles.AllowWhiteSpaces or else white space may not be parsed correctly. For example, to assume UTC when no time zone is specified and keep the default white space handling, set ParsingStyles to DateTimeStyles.AllowWhiteSpaces | DateTimeStyles.AssumeUniversal.
Sample XAML
This control can be placed within any other XAML container control, such as a Page or Panel with this sort of XAML:
<editors:DateTimeEditBox Value="{Binding Path=YourVMProperty, Mode=TwoWay}" />