rome icon indicating copy to clipboard operation
rome copied to clipboard

inputFormat "HH:mm" messes up the hour

Open skerit opened this issue 8 years ago • 2 comments

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'
        });

skerit avatar Mar 06 '16 19:03 skerit

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

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

bevacqua avatar Mar 06 '16 19:03 bevacqua

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

skerit avatar Mar 06 '16 19:03 skerit