Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
as the default date time picker in the .net Windows form which is for English Calendar. i want to make my own date time picker control for Nepali calender. can anybody suggest me how to begin. i have converting code for the calender from English to Nepali. Can we simply edit date time picker and make it.
thanks in advance..
Posted
Comments
Herman<T>.Instance 2-Apr-14 3:51am    
See here!

You can create your own user control[^]
Basically it means you put a bunch of controls together that have a logic behind them.

Eg. You could replace the normal datetimepicker with a usercontrol that has a MaskedTextBox[^] and an icon. You can use that with a DateTime object in the background to input and validate datetimes. You could also foresee config for the datetime format, min/max values, inputhandlers (up/down keys eg), etc...

Something similar could be a solution for you, but the question for you to answer is how difficult or complex does it need to be.

Hope this helps.
 
Share this answer
 
CodeProject is your friend; hopefully you can learn from this example of creating a Persian-language DateTimePicker: [^].

You need to keep in mind that: "The DateTimePicker and MonthCalendar control do not reflect the CurrentUICulture property of an application's main execution thread when you created a localized application in the .NET Framework, in Visual Studio 2005, or in Visual Studio .NET" [^].

So, if you want to adapt the DateTimePicker to your language, you must learn how to set the current user-locale of the Application. Again, CodeProject can probably help you: "Culture Aware Month Calendar and DatePicker" [^].
 
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