I'm trying to change the value of an input
with type time
but I can't find a solution.
This is my attempt:
$("input").val("10.15");
Fiddle: http://jsfiddle.net/bUYC6/
How can I do?
As you may know, you must provide a RFC3339 Standardised time format, better explained the in Internet Date/Time Format So a clean input would be:
$("input").val( "18:01:07" );
###Fiddle: http://jsfiddle.net/2btUd/
Although I believe you're trying to input a secfrac (A fraction of a second..) as explained in the above link, which you could apply:
<input type="time" value="" step="0.10" />
<script>
$("input").val( "00:00:00.10" );
</script>
###Fiddle: http://jsfiddle.net/7eh93/
Which understandably isn't a clean method, but I don't think <input type="time" />
is best worked with time-fractions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With