bevacqua / rome

:calendar: Customizable date (and time) picker. Opt-in UI, no jQuery!
https://bevacqua.github.io/rome
MIT License
2.91k stars 223 forks source link

Seconds and Milliseconds #222

Open trymeouteh opened 5 months ago

trymeouteh commented 5 months ago

Please add support for using seconds and 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>