-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Master version: 1.0.4
The problem is in timeFormat argument, when text enclosed in double quotes is treated as a sequence of literar characters. This is not the same with dateFormat. The reason is that the dateFormat is used by original jQuery UI datepicker 's formatDate function, but the timeFormat is processed in timepicker's formatTime function.
For instance, when you use "dd".mm.yy dateFormat, you will get this kind of result: "03".10.2012. But when you use same pattern for timeFormat "hh":mm, you will get "hh":35 as a result and hh is not detected as a hour number.
So I guess it should behave the same and double quotes should not be used for enclosing sequence of literars. Only single quote should do it (as it is for original datepicker). The change in code is quite simple, just remove the ".*?" from regular expression in $.datepicker.formatTime timepicker function. The new line should look like this:
tmptime = tmptime.replace(/(?:hh?|mm?|ss?|[tT]{1,2}|[lz]|'.*?')/g, function (match) {