如何在dateTimePicker中更改日历类型? [英] How to change the calendar type in dateTimePicker?

查看:100
本文介绍了如何在dateTimePicker中更改日历类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将dateTimePicker中的日历类型从gregorian更改为hijri但是我不能将系统日历类型设置为gregorian。



i尝试此代码



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;



但没有工作!?



如何在我的App中更改它?


but not working !?

how i can change it in my App?

推荐答案

我找到了很好的Code Project文章。它可以帮助您解决问题:-)



Farsi Library - 使用日期,日历和DatePickers
I found this nice Code Project article. It may help you to solve your problem :-)

Farsi Library - Working with Dates, Calendars, and DatePickers


这篇关于如何在dateTimePicker中更改日历类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆