This is a migrated thread and some comments may be shown as answers.

DateTimePicker with seconds

2 Answers 1239 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Rolf
Top achievements
Rank 1
Rolf asked on 28 Jan 2015, 10:04 AM
We use the DateTimePicker for the DateTimePickerFor() method in our Asp.net MVC 5 web application. And it requires that the user can enter a date and time including seconds, however by default the Telerik UI only shows date and time until minutes. I cannot find a way for the text input box to show the seconds or allow the input of seconds. If I set TimeFormat to CultureInfo.CurrentUICulture.DateTimeFormat.LongTimePattern then I'll only show the seconds in the drop down, but the text input won't show it.

Is there a way to have this done?

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 30 Jan 2015, 08:07 AM
Hello Rolf,

I would suggest you set the widget format (using Format method) to the desired value that has seconds in it. For instance, "MM/dd/yyyy hh:mm:ss tt" will do the trick. 

Regards,
Georgi Krustev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Rolf
Top achievements
Rank 1
answered on 11 Feb 2015, 10:50 AM
That works indeed. Thanks
Tags
Date/Time Pickers
Asked by
Rolf
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Rolf
Top achievements
Rank 1
Share this question
or