We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set Different pattern in DatetimeEdit Control?

Platform: WPF |
Control: DateTimeEdit

To set the different pattern for the dates in the DateTimeEdit control, the Pattern property can be used. The Pattern property consist of different values, as follows below:

  • Custom pattern
  • Short Date
  • FullDateTime
  • LongDate
  • LongTime
  • MonthDay
  • RFC1123
  • ShortDate
  • ShortTime
  • SortableDateTime
  • UniversableSortableDateTime
  • YearMonth

The following code snippet shows how to set the YearMonth pattern in the DateTimeEdit control using Pattern property. Similarly, the different patterns can be set using the Pattern property.






The following output shows the Year and Month by setting YearMonth pattern




2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile