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

inputFormat "HH:mm" messes up the hour #160

Open skerit opened 8 years ago

skerit commented 8 years ago

I want to show only the time in a text input.

That kind of works, but when I set the "inputFormat" option to "HH:mm" the hour portion gets messed up, even though the minutes are OK.

For example: 17:48 becomes 20:48. Any idea why that is?

Here's the brief code snippet I use to initialize rome:

      rome(element, {
            initialValue: $element.data('date'), // 2016-03-04T17:48:00.039Z
            inputFormat: 'HH:mm'
        });
bevacqua commented 8 years ago

http://momentjs.com/docs/#/displaying/

It has nothing to do with format, probably a timezone issue on your end.

skerit commented 8 years ago

That's strange, because when I add "YYYY-MM-dd" it does show the correct hour