bevacqua/rome

Seconds and Milliseconds

trymeouteh opened this issue · 0 comments

Please add support for using seconds and milliseconds

  • Output time into input tag with milliseconds when inputFormat is set to allow it (Since timeInterval does not support milliseconds, it will not work with millisecond output as in the example code below, it will output the wrong time in milliseconds)
  • min and max cannot be set to include seconds or milliseconds.

This is my code right now and it currently does not fully for seconds and milliseconds

<link rel="stylesheet" href="node_modules/@bevacqua/rome/dist/rome.min.css">



<input>
<input>



<script src="node_modules/@bevacqua/rome/dist/rome.min.js"></script>

<script>
    //Seconds
    rome(document.querySelectorAll('input')[0], {
        date: false,

        min: '00:00',
        max: '00:30',
        
        timeFormat: 'HH:mm:ss',
        timeInterval: 30,
        inputFormat: 'HH:mm:ss'
    });

    //Milliseconds
    rome(document.querySelectorAll('input')[1], {
        date: false,

        min: '00:00',
        max: '00:01',

        timeFormat: 'HH:mm:ss:SSS',
        timeInterval: 0.5,
        inputFormat: 'HH:mm:ss:SSS'
    });
</script>