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???
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With