Silverlight / WPF - Show only time in date picker

Asked By sushant kumar kesari on 15-Sep-11 05:46 AM
hello friend 

 i want to show only time in date picker.
how to change format to show only time.

reply asap.
Reena Jain replied to sushant kumar kesari on 15-Sep-11 05:51 AM
Hi,

If you want your application to enable users to select a date and time, and to display that date and time in the specified format, use the DateTimePicker control. The following procedure shows how to use the DateTimePicker control to display the time.

Set the Format property to Time
timePicker.Format = DateTimePickerFormat.Time;
Set the ShowUpDown property for the DateTimePicker to true.
timePicker.ShowUpDown = true;
smr replied to sushant kumar kesari on 15-Sep-11 05:51 AM
Hi

There's a TimePicker control on Silverlight ToolKit but not on WPF ToolKit.
Maybe you can use the source code from SL3 ToolKit if you use WPF ToolKit VisualStateManager.

u can download source code from below link

http://marlongrech.wordpress.com/2007/11/18/time-picker/
dipa ahuja replied to sushant kumar kesari on 15-Sep-11 06:55 AM
dateTimePicker.SelectedDate.ToString("hh-mm-ss");
Jitendra Faye replied to sushant kumar kesari on 15-Sep-11 08:05 AM
You can use Extended WPF Toolkit, in that you will find a ready TimePickerControl


Here is a sneak peek.

time_picker.jpg

you can download from this link
http://wpftoolkit.codeplex.com/wikipage?title=TimePicker&referringTitle=Home

Radhika roy replied to sushant kumar kesari on 15-Sep-11 11:40 AM

 

You can use Time picker control .

DOWNLOAD SOURCE CODE

 

 

 

 

 

Follow this link-

http://marlongrech.wordpress.com/2007/11/18/time-picker/

 

 

Hope this will help you.