DateTimePicker with seconds

3 posts, 0 answers
  1. Rolf
    Rolf avatar
    2 posts
    Member since:
    Jan 2015

    Posted 28 Jan 2015 Link to this post

    We use the DateTimePicker for the DateTimePickerFor() method in our 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. Georgi Krustev
    Georgi Krustev avatar
    3689 posts

    Posted 30 Jan 2015 Link to this post

    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. 

    Georgi Krustev

    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.

  3. UI for ASP.NET AJAX bannerTelerik UI for ASP.NET Core is out
  4. Rolf
    Rolf avatar
    2 posts
    Member since:
    Jan 2015

    Posted 11 Feb 2015 in reply to Georgi Krustev Link to this post

    That works indeed. Thanks
Back to Top