Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persian datetimepicker in C# .net windows form

I want to get datetime from user in windows form C#.net .I use datetimepicker of .net control but it is gregorian so how can I change This datetimepicker to shamsi date??? DatetimePicker image in winform

like image 816
saba Avatar asked Oct 18 '16 19:10

saba


1 Answers

Previously I tried Behrooz Moghaddam's code but using the default winforms DateTimePicker control, but that code didn't work.

Now I am using the telerik RadDateTimePicker and write this code after InitializeComponent() and instead of "fa-IR" use your culture.

Application.CurrentCulture = new CultureInfo("fa-IR");
radDateTimePicker1.Format = DateTimePickerFormat.Custom;
radDateTimePicker1.CustomFormat = Application.CurrentCulture.DateTimeFormat.ShortDatePattern;
like image 53
im_shidi Avatar answered Oct 23 '22 12:10

im_shidi