)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I set different patterns for the date in the SfDatePicker?

Platform: WinRT |
Control: SfDatePicker |
Published Date: August 5, 2015 |
Last Revised Date: August 5, 2015 |
.NET Framework: 4.5

In the SfDatePicker, different patterns can be set for dates by using the SelectorFormatString property according to its values. Some of the patterns are as follows:

  1. MonthDayPattern
  2. YearMonthPattern
  3. DayYearPattern
  4. YearMonthDayPattern
  5. YearDayMonthPattern
  6. YearPattern

 

  1. The following code example explains how to set the SelectorFormatString property for the MonthDayPattern:

XAML

 

C#

 

The following screenshot shows the MonthDay pattern.

Figure 1: MonthDay pattern

 

2. The following code explains how to set the SelectorFormatString property for the YearMonth pattern:

XAML

 

C#

 

The following screenshot shows the YearMonth pattern.

Figure 2: YearMonth pattern

 

  1. The following code example explains how to set the SelectorFormatString property for the DayYearPattern:

XAML

 

C#

 

The following screenshot shows the DayYear pattern.

Figure 3: DayYear pattern

  1. The following code example explains how to set the SelectorFormatString property for the YearMonthDay pattern.

XAML

 

C#

 

The following screenshot shows the date with YearMonthDay pattern.

Figure 4: YearMonthDay pattern

  1. The following code explains how to set the SelectorFormatString property for the YearDayMonth pattern.

XAML

 

C#

 

The following screenshot shows the date with the YearDayMonth pattern.

.

Figure 5: YearDayMonth pattern

  1. The following code example explains how to set the SelectorFormatString property for the YearPattern.

XAML

 

C#

 

The following screenshot shows the date with the Year pattern.

 

Figure 6: Year pattern

ADD COMMENT
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
Live Chat Icon