Type="datatime-local" does not take seconds

Asked

Viewed 17 times

1

Soon the W3C went on to discontinue "datatime" and use "datatime-local", but I can’t take more seconds to make a specific report. Friends can help me?

1 answer

2


It seems that set the setp of input as 1, guy step="1"

inserir a descrição da imagem aqui

See here a list, it seems to me that you want the last example, notice that you are with the step="1". Keep in mind that this may have crossbrowser conditions and may be different depending on the user-agent of the client’s browser

<input type="time">  
<input type="time" step="1">  
<input type="date">  
<input type="datetime">  <!-- deprecado sem formatação do user-agent -->
<input type="datetime-local" step="1">  

inserir a descrição da imagem aqui

Image source that was taken from the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step

Browser other questions tagged

You are not signed in. Login or sign up in order to post.