Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9199635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:34:44+00:00 2026-06-17T22:34:44+00:00

When I use JavaScript to set the value of an HTML5 time object, like

  • 0

When I use JavaScript to set the value of an HTML5 “time” object, like this:

document.getElementById("settime").value = "13:24:59";

It will show a time control with “13:24:59” on it, and I can change everything. But if I do this:

document.getElementById("settime").value = "13:25:00";

It hides the seconds, showing just “13:25” with no seconds. How do I force the “00” seconds to appear in this case?

(This is in Google Chrome, by the way.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:34:45+00:00Added an answer on June 17, 2026 at 10:34 pm

    Set the step attribute.

    Ex: <input id="settime" type="time" step="1" />

    document.getElementById("settime").value = "13:24:00";
    <input id="settime" type="time" step="1" />

    A note about the step attribute:

    The step attribute can be used with a numerical input value to dictate how granular the values you can input are. For example, you might want users to enter a particular time, but only in 30 minute increments. In this case, we can use the step attribute, keeping in mind that for time inputs the value of the attribute is in seconds. For example, a 30 minute increment would have a step value of 1800. <input type="time" step="1800">

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use a Javascript hash object to store a set of numerical counters, set
I am trying to use JavaScript to set an elements width relative to their
Is it possible to use some kind of JavaScript to change or set a
i use javascript to judge a page is in a iframe: if (this !=
Is it possible to use jstl inside javascript? I'm tying to set <c:set var=abc
I use JavaScript for rendering 20 tables of 100 rows each. The data for
It is possible to use JavaScript inside a view of a Eclipse Plugin?
I want use javascript setInterval function to achieve a box rotate animate effect, I
I need to use javascript to get the itemid of the current page in
I want to use javascript to detect if an element exists under the cursor

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.