8
Reply

How to change the calendar type in dateTimePicker?

Max Albish

Max Albish

Aug 6 2014 7:06 PM
6.8k

i try to change the calendar type in dateTimePicker from gregorian to hijri but i cant cuz the system calender type it's gregorian .

i try this code

 CultureInfo ci = new CultureInfo("ar-SA"); 
 DateTimeFormatInfo info = ci.DateTimeFormat;
  dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; 
 dateTimePicker1.CustomFormat = info.ShortDatePattern + " " + info.ShortTimePattern; 

but not working !?

how i can change it in my App?


Answers (8)