Rank: Newbie Groups: Member
Joined: 11/16/2009 Posts: 2
|
Hello, i use a DatePicker-control for input a date... so as:
...
DateTime SysDate new DateTime(); DatePicker dp=new DatePicker();
SysDate=DateTime.Now;
// Time 16.11.2009 15:11 (German-format dp.SelectedDateString = SysDate.ToShortDateString() + " " + SysDate.ToShortTimeString();
...
and now is in dp.SelectedDateString 16.11.2009 03:11 and not 16.11.2009 (((15:11))).
how can i change in a 24h-TimeFormat?
please help...
Thanks for answers!!
Torsten
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I believe you can use "HH" in the DatePicker's PickerFormat property to allow user to enter hours in 24h format. For example, if you set it to "yyyy/MM/dd HH:mm", then user will be able to enter "2009/11/16 15:11". If you use "hh" instead of "HH", then user will only be able to enter the hour in 12h format.
Thanks!
|
Rank: Member Groups: Member
Joined: 11/13/2009 Posts: 22
|
it'd be nice if we had some way to pick a time using the mouse as well...something like this: http://www.dynarch.com/projects/calendar/
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can do that with custom footer. You will implement the spin (which should be quite easy with some JavaScript) and the Calendar will just take whatever you have and put it inside the footer area.
Thanks!
|