Derives from Xceed.Wpf.Toolkit.DateTimeUpDown

Get the best of both worlds: The user can increment or decrement the DateTime using button spinners, up/down keys, or the mouse wheel, or can modify the DateTime in the dropdown calendar.



Property Description
AllowSpin Gets or sets the ability to perform increment/decrement operations via the keyboard, button spinners, or mouse wheel. (Inherited from UpDownBase)
AutoCloseCalendar Gets or sets if the Calendar should close on a selection.
ClipValueToMinMax Gets or sets if the value should be clipped when minimum/maximum is reached. (Inherited from UpDownBase)
CultureInfo Gets or sets the current CultureInfo. (Inherited from InputBase)
DefaultValue Gets or sets the value to use when the Value is null and an increment/decrement operation is performed. (Inherited from UpDownBase)
DisplayDefaultValueOnEmptyText Gets or sets if the DefaultValue should be displayed when the Text is empty. (Inherited from UpDownBase)
Format Gets or sets a DateTimeFormat value representing the format to be used (FullDateTime, LongDate, etc.). (Inherited from DateTimeUpDown).
FormatString Gets or sets the display format to use when Format is set to Custom (e.g., "hh:mm tt") (Inherited from DateTimeUpDown).
IsOpen Gets or sets a value indicating whether the DateTimePicker is open.
IsReadOnly Gets or sets if the control is read only. (Inherited from InputBase)
Kind Gets or sets a value indicating whether a DateTime object represents a local time, a Coordinated Universal Time (UTC), or is not specified as either local time or UTC. NOTE: Setting this property fixes a bug where losing focus on the DateTimePicker was incrementing time in UTC. It also fixes a bug where specifying a UTC Date was changing the date's Kind property to UnSpecified or Local.
Maximum Gets or sets the maximum allowed value. (Inherited from UpDownBase)
Minimum Gets or sets the minimum allowed value. (Inherited from UpDownBase)
MouseWheelActiveTrigger Gets or sets when the MouseWheel is active (Focused, FocusedMouseOver, MouseOver, Disabled). By default FocusedMouseOver. (Inherited from UpDownBase).
ShowButtonSpinner Gets or sets if the ButtonSpinners are visible. (Inherited from UpDownBase)
Text Gets or sets the formatted string representation of the value. (Inherited from InputBase)
TextAlignment Gets or sets the alignment of the Text. (Left, Right, Center, Justify). By default Left. (Inherited from InputBase)
TimeFormat Gets or sets the time format.
TimeFormatString Gets or sets the time format string used when TimeFormat is set to Custom.
TimePickerAllowSpin Gets or sets if the TimePicker in the DateTimePicker can Spin.
TimePickerShowButtonSpinner Gets or sets if the ButtonSpinners of the TimePicker in the DateTimePicker are shown.
TimePickerVisibility Gets or sets if the TimePicker in the DateTimePicker is visible.
TimeWatermark Gets or sets the time watermark.
TimeWatermarkTemplate Gets or sets the time watermark's data template.
UpdateValueOnEnterKey Gets or sets a value indicating whether the synchronization between "Value" and "Text" should be done only on the Enter key press (and lost focus).
Value Gets or sets the numeric value. (Inherited from UpDownBase)
Watermark Gets or sets the object to use as a watermark if Value is null. (Inherited from InputBase)
WatermarkTemplate Gets or sets the DataTemplate to use for the Watermark. (Inherited from InputBase)


Event Description
InputValidationError Raised when the Text cannot be converted to a valid Value. (Inherited from UpDownBase)
ValueChanged Raised when the Value changes. (Inherited from UpDownBase)


Method Description
SelectAll Select all the Text from the TextBox in the DateTimePicker. (Inherited from DateTimeUpDownBase)

Support this project, check out the Plus Edition.

Last edited Jun 1 at 3:49 PM by dlafontaine, version 14


BoucherS Nov 2 at 6:25 PM 
v3.1 is available for Plus users here :
Many fixes were done on TimePicker/DateTimePicker in v3.1, it's not only 1 fix. I suggest you buy v3.1 Plus or wait for v3.1 Community.
Community users currently have v2.9.
v3.2 Plus and v3.0 Community will be available before the end of 2016.
v3.1 Community will become available during 2017.
If you need this right now, we have a promotion for the Plus Edition !

Super169 Nov 2 at 2:39 PM 
May I know where I can get the fix (release 3.1?) on keyboard input?

BoucherS Sep 19 at 2:08 PM 
release v3.1 fixes the typing in the DatetimePicker/TimePicker.

tokm Sep 16 at 7:29 PM 
Minutes cannot be typed in. If you try to type '35' for the minutes, the cursor position starts typing over the AM/PM. This is also broken in the TimePicker control. The only option if you are using the keyboard is to use the up/down arrow keys. This control used to support typing in the minutes.

BoucherS Jun 15 at 5:15 PM 
Hi, you can try to set the DefaultValue property.

RichterE Jun 14 at 3:19 PM 
If I am right, the default date in DateTimePicker's calendar is always the current date. How can I set another date (e. g. tomorrow)? Thanks!

BoucherS Mar 30 at 5:02 PM 
This is fixed in v2.9. Only 1 event is raised on ValueChanged.

SezMe Mar 27 at 12:19 PM 
The event ValueChanged is firing twice for each event occurrence.

BoucherS Mar 14 at 2:06 PM 

Discussion has been created.

SezMe Mar 14 at 9:09 AM 
For long months (i.e., December) the date part at the top of the dropdown calendar is being truncated. For example, it looks like "December, 2" instead of "December, 2016". Is there a way to set the width of the dropdown?

BoucherS Jun 1, 2015 at 1:14 PM 
This is fixed in v2.5.

GopiChandar Jun 1, 2015 at 10:08 AM 
I am seeting the max value for datetime picker as

DateTimePicker.Maximum = DateTime.Now;

It is not allowing to scroll down the fture time as intended. However, it is allowing us to pick the future time if we pick the time from dropdown on TimePicker. .

BoucherS May 11, 2015 at 1:27 PM 
Discussion has been created.

GopiChandar May 11, 2015 at 9:50 AM 
Is it possible to trigger the dropdown on clicking the Textbox in the control. .

CrazyTasty Oct 5, 2013 at 4:11 AM 
I wondering why the DateTimePicker control has no BlackoutDates property. I was using a standard WPF DatePicker with a custom attached property that let me select ranges of blackout dates. I switched to the DateTimePicker control, but I'm struggling to get the attached property to work again.

BoucherS Jul 29, 2013 at 8:56 PM 
If you want to remove the dropDown button of a dateTimePicker, use a DateTimeUpDown.
Looks like the datetimepicker is updating after it lost focus when trying to edit the time manually.

sheenlim Jul 21, 2013 at 3:34 AM 
How can I remove the dropdown button of datetime picker?

Also, the datetimepicker is not updated after it lost focus when trying to edit the time manually.

BoucherS Nov 29, 2012 at 2:43 PM 
Yes that is true, but v1.9 fixes the problem. Please use the discussion or issueTracker tab to report issues.

tewnn Nov 29, 2012 at 2:18 PM 
Looks like it's impossible to enter date and time from keyboard in version 1.8.0. Is it true?

BoucherS Nov 1, 2012 at 2:39 PM 
To use the DateTimePicker without the Time selection and to close the Calendar on a Date selection, you can use the DatePicker. Unless you prefer the features from the Toolkit DateTimePicker. In that case we could have a look evaluate if those features are wanted.

juhav Nov 1, 2012 at 10:19 AM 
How can I hide the time selection? Is it possible for the calendar to close when date is selected?

emartin Oct 22, 2012 at 1:18 PM 
skroged, your comments on the following thread would be welcomed:

skroged Oct 19, 2012 at 3:21 AM 
+10 points for the widget. -`1000 for not making it conform to WPF standards. The selected DateTime needs to be a dependency property so it can be data-bound in xaml. It needs to be nullable.

I'm afraid it's rather unusable for me in it's current state. Good start though.

skst Oct 12, 2012 at 3:26 AM 
It'd be nice if there were an option to have the time to the left of the date. Or is the appropriate method for doing that to re-templatize the control? (That seems a bit extreme.)

midiman Aug 23, 2012 at 8:04 AM 
I also need the masked textbox. If the user types a separator, the cursor should be moved only.

caouellet Jul 26, 2012 at 6:31 PM 
As far as DateTime format goes and localization why not have used the windows and dot net framework's existing mechanics instead of a custom system

adondero Jun 8, 2012 at 10:35 PM 
I was wondering is there a way to add "Masked" edit to the date time picker.

We have our users using the format mm/dd/yyyy HH24:mi. Our product management would like to not have the users type the "/" or ":" and either have a masked text box or some sort of "format this date" method so we can apply our own formatting and add in the missing characters.

Any thoughts or help would be appreciated.

ybonda Jun 3, 2012 at 12:40 PM 
Good example of WPF DateTimePicker In DataGrid -

zaherz May 24, 2012 at 12:34 PM 
how come i can set min and max date values at the current updown button and to disable the dates that are out of range and to be effected by the time updown button that located at the calendar popup??

Imker May 11, 2012 at 10:24 AM 
If you want to set the focus to a datetimepicker in codebehind,
use the property Focusable="True", so the datetimepicker can get the focus.

zhoufoxcn Mar 31, 2012 at 4:04 PM 

jpnavarini Mar 14, 2012 at 5:52 PM 
Is it possible to add seconds into the time picker, below the calendar?
I can use the spin up and down in the text box to change the seconds, but I would like to do it when the calendar is open, using the up and down spinners of the time picker.

plansoft Feb 13, 2012 at 10:27 PM 
Would be nice if setting the height (i.e. 22) would not hide part of the text/value. Seems to have a fair amount of padding (and no, changing padding does not have an effect). Smaller height necessary in our case for complex data entry forms where space is at a premium. All other standard WPF controls size very well.

skst Dec 1, 2011 at 4:54 PM 

bool IsOpen

object TimeWatermark
DataTemplate TimeWatermarkTemplate

string FormatString

DateTime DefaultValue
DateTimeFormat Format