Search code examples
c#windows-phone-8telerikraddatepicker

Select a Gregorian date and display the equivalent hebrew date


Created a RadDatePicker in this way:

XAML:

 <telerikInput:RadDatePicker x:Name="TelerikDatePicker"
     HorizontalAlignment="Center"
     VerticalAlignment="Center"
     Width="300" >
 </telerikInput:RadDatePicker>

and C#:

 var cultureInfo = new CultureInfo( "he-IL" );
 cultureInfo.DateTimeFormat.Calendar = new HebrewCalendar();
 TelerikDatePicker.Culture = cultureInfo;

The behavior is shown in the attached 2 screenshots (Select a date in the Hebrew calendar and display the result as the equivalent Gregorian date):

I would like to do the opposite behavior, i.e. to have the user select a Gregorian date and display the result as the equivalent Hebrew date.

How can I do that?

Thanks, Eitan

Select Hebrew Date

Gregorian equivalent date


Solution

  • An answer I got from Telerik:

    "Following the Microsoft standards the RadDatePicker control gets the CultureInfo of the current thread, so it is not possible to have RadDatePickers with different calendars on one page."