9
Answers

How to change the calendar type in dateTimePicker?

Max Albish

Max Albish

10y
12.7k
1

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 (9)