Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Chris Mahoney 235 posts 447 karma points
    Jun 23, 2022 @ 22:50
    Chris Mahoney

    How do I add Seconds to a Time Picker in Umbraco 10?


    I'm upgrading an old site from Umbraco 7 to 10. On the old site I have a data type for setting a time in hours, minutes and seconds. It's using the Date/Time property editor and a date format of "HH:mm:ss".

    When I click into the field when editing content it gives a calendar by default, but I can click the clock icon to select hours, minutes and seconds. Alternatively I can just type e.g. "1:23:45" into the field and it accepts this.

    In Umbraco 10 I've set up the data type the same way, but it behaves differently. It doesn't show a calendar at all but goes straight to a time picker with only hours and minutes. It's not possible to type into the field (as soon as you click it, it displays the time picker and sets focus to the hour element). I can't find any way of setting the seconds.

    What have I missed? :)

  • B. Gunnarsson (Bryns) 25 posts 180 karma points c-trib
    Jun 24, 2022 @ 13:30
    B. Gunnarsson (Bryns)

    Check your datatype configuration, my setup has 2 datatypes for date picker - one with time and one without.

    enter image description here

  • Chris Mahoney 235 posts 447 karma points
    Jun 24, 2022 @ 22:33
    Chris Mahoney

    Correct, but neither of those default data types allow me to enter seconds. Do they work for you?

  • Chris Mahoney 235 posts 447 karma points
    Jun 25, 2022 @ 05:39
    Chris Mahoney

    I've found that in a pinch I can use a Textstring data type and then DateTime.Parse it when I actually use it, but it would be nice to get a working time picker in the Umbraco UI.

  • Glenn 1 post 71 karma points
    Jun 28, 2022 @ 07:55

    I'm bumping up this question. I hope someone can help.

Please Sign in or register to post replies

Write your reply to: