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.
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?

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

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework:
5307 08/05/2015 08/05/2015 WinRT SfDatePicker 4.5
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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