n.y
n.y

Reputation: 3490

CalendarIdentifier in UWP CalendarDatePicker

I have used CalendarDatePicker with CalendarIdentifier="PersianCalendar" in my UWP app:

<CalendarDatePicker x:Name="btnDatePicker" CalendarIdentifier="PersianCalendar" PlaceholderText="..." IsTodayHighlighted="False"></CalendarDatePicker>

Everything works fine until the user selects a Persian date and then CalendarDatePicker displays the Gregorian date.

Any help or insight is much appreciated.

Upvotes: 1

Views: 386

Answers (1)

TheSETJ
TheSETJ

Reputation: 528

As you can find here, there is "Persian" calendar available, however I did not find any way to set CalendarIdentifier to Persian in Xaml, but it's possible to set it in Code Behind:

btnDatePicker.CalendarIdentifier = CalendarIdentifiers.Persian;

and everything should work fine:

enter image description here

Upvotes: 1

Related Questions