WPF DateTimeEdit Overview

DateTimeEdit is a control that allows you to select and edit the date with support for data binding, Null Value, Watermark, maximum and minimum value, and culture. It provides many customization options to enhance its appearance and to suit your applications.

The core features of the DateTimeEdit are as follows:

  • Provides eleven different types of DateTime patterns.
  • Supports custom date formats.
  • Provides culture support.
  • Provides data binding support.
  • Provides Null Value support.
  • Provides keyboard and mouse support.
  • Provides Watermark support.
  • Provides maximum and minimum value support.

Control structure

DateTimeEdit control structure

DateTimeEdit control structure

DateTimeEdit control structure

DateTimeEdit members

DateTimeEdit exposes the following members:

Properties

DateTimeEdit Members table

Name Type Value it Accepts Description Default Value Reference Link
CustomPattern DependencyProperty String Gets or sets the Format that is used to display the date. String.Empty CustomPattern
CultureInfo DependencyProperty Culture Gets or sets the CultureInfo property. - CultureInfo
DateTimeFormat DependencyProperty DateTimeFormatInfo DateTimeFormat defines the format to display the date. - DateTimeFormat
NoneDateText DependencyProperty String Gets or sets the NoneDateTextProperty. 'No date is selected' NoneDateText
IsScrollingOnCircle DependencyProperty Bool Gets or sets the IsScrollingOnCircle property. True IsScrollingOnCircle
IsPopupEnabled DependencyProperty Bool Gets or sets a value indicating whether the Dropdown popup is open or closed. True IsPopupEnabled
IsEnabledRepeatButton DependencyProperty Bool Gets or sets a value indicating whether the RepeatButton is enabled or disabled. True IsEnabledRepeatButton
IsEmptyDateEnabled DependencyProperty Bool Gets or sets the IsEmptyDateEnabled property. False IsEmptyDateEnabled
IsWatchEnabled DependencyProperty Bool Gets or sets the Visibility of the Watch in the Dropdown Popup. True IsWatchEnabled
IsCalendarEnabled DependencyProperty Bool Gets or sets the Visibility of the Calendar in the Dropdown Popup. True IsCalendarEnabled
IsVisibleRepeatButton DependencyProperty Bool Gets or sets the Visibility of the RepeatButton. False IsVisibleRepeatButton
IsButtonPopUpEnabled DependencyProperty Bool Gets or sets the Visibility of the Dropdown Button. True IsButtonPopUpEnabled
Pattern DependencyProperty Enum of Type DateTimePattern Gets or sets the Format that is used to display the date. DateTimePattern.FullDateTime Pattern
RepeatButtonBackground DependencyProperty Brush Gets or sets the Background for the RepeatButton. - RepeatButtonBackground
RepeatButtonBorderThickness DependencyProperty Thickness Gets or sets the BorderThickness for the RepeatButton. - RepeatButtonBorderThickness
UpRepeatButtonTemplate DependencyProperty ControlTemplate Gets or sets the ControlTemplate for the UpRepeatButton. - UpRepeatButtonTemplate
DownRepeatButtonTemplate DependencyProperty ControlTemplate Gets or sets the ControlTemplate for the DownRepeatButton. - DownRepeatButtonTemplate
DropDownButtonTemplate DependencyProperty ControlTemplate Gets or sets the ControlTemplate for the DropDownButton. - DropDownButtonTemplate
NullValue DependencyProperty DateTime? Gets or sets the NullValue property. Null NullValue
DateTime DependencyProperty DateTime? Gets or sets the date for the DateTimeEdit control. Null DateTime
MinDateTime DependencyProperty DateTime Gets or sets the
Minimum value for the DateTimeEdit control.
00:00:00.0000000, January 1, 0001 MinDateTime
MaxDateTime DependencyProperty DateTime Gets or sets the Maximum value for the DateTimeEdit control. 23:59:59.9999999, December 31, 9999, exactly one 100-nanosecond tick before 00:00:00, January 1, 10000 MaxDateTime

Events

DateTimeEdit members Events table

Name Event Type Event Args Parameter Description Reference Link
DateTimeChanged PropertyChangedCallback DependencyPropertyChangedEventArgs Occurs after the DateTime value of the DateTimeEdit control has changed. DateTimeChanged
MaxDateTimeChanged PropertyChangedCallback DependencyPropertyChangedEventArgs Occurs after the MaxDateTime of the DateTimeEdit control has changed. MaxDateTimeChanged
MinDateTimeChanged PropertyChangedCallback DependencyPropertyChangedEventArgs Occurs after the MinDateTime of the DateTimeEdit control has changed. PropertyChangedCallback
PatternChanged PropertyChangedCallback DependencyPropertyChangedEventArgs Occurs after the Pattern property of the DateTimeEdit control has changed. PatternChanged
CalendarPopupOpened PropertyChangedCallback DependencyPropertyChangedEventArgs Occurs when the Calendar Popup opens. CalendarPopupOpened