views:

33

answers:

3

hi

i have DataTimePicker control in my form.

i want to show only hh:mm

how i can do it ?

thank's in advance

+1  A: 

Use the customformat Property.... See the custom formats in msdn DateTime.ToString() overloads

Steav
A: 
$('selector').datepicker({dateFormat: 'yy-mm-dd hh:nn'});

as shown in the datepicker documentation. (There are also ways to pre-define default settings, so you don't have to do that every time. See the documentation for details.)

Tomas Lycken
I think he is talking about the WinForms DateTimePicker, nothing to do with jQuery here.
Tiberiu Ana
+1  A: 

Set the Format property to Custom.

Set the CustomFormat property to HH:mm for 24-hour time or hh:mm for 12-hour time.

See CustomFormat for reference.

Tiberiu Ana