Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

C#
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?
Posted

1 solution

I found this nice Code Project article. It may help you to solve your problem :-)

Farsi Library - Working with Dates, Calendars, and DatePickers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900