trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.67k stars 1.05k forks source link

i18n and time format issue #791

Open adanyc opened 9 years ago

adanyc commented 9 years ago

I need this time format 'a.m.' and 'p.m. Inside the plugins' project, I found a i18n file to translate it to spanish and I used it. I think it's an issue. Could you help me to solve it?

$(obj).datetimepicker({ timeFormat: "HH:mm tt", amNames: ['a.m.', 'AM', 'A'], // original ['AM', 'A'] pmNames: ['p.m.', 'PM', 'P'], // original ['AM', 'A'] controlType: 'select' }); I got the problem following this steps 1.- Open the control. 2.- Select for example: "8:30 a.m." 3.- Open the control again and I found the hour was changed to 'p.m.' automatically and was added +12 to my original time I selected on step 1.

Please, I need some help with it because I think Its a good plugin. Sorry for my bad english.

Thank you in advance.

quedicesebas commented 9 years ago

Maybe you have to change the timeFormat form "HH:mm tt" to "hh:mm tt"?