You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Luckily, step still works when not an integer. This gives me a picker with "00:00" to "14:59".
Unfortunately typing into the input field (which I need) always gets parsed as hours:mins:secs, and so typing "10:23" for example, gets changed to "23:00".
The _time2int function is using a hard-coded regex, ignoring the options format.
// try to parse time input
var pattern = new RegExp('^'+ampmRegex+'([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?'+ampmRegex+'$');
It would be better if it first tried to use the provided format, e.g. my "i:s", as it would then correctly parse the right value. It can fall back to this generic if necessary.
The text was updated successfully, but these errors were encountered:
I have a case where I'm using timepicker for a duration picker, in seconds up to 15 mins;
<input type="text" data-time-format="i:s" data-none-option="true" data-step="0.0167" data-min-time="00:00:00" data-max-time="00:15:00" />
Luckily, step still works when not an integer. This gives me a picker with "00:00" to "14:59".
Unfortunately typing into the input field (which I need) always gets parsed as hours:mins:secs, and so typing "10:23" for example, gets changed to "23:00".
The _time2int function is using a hard-coded regex, ignoring the options format.
It would be better if it first tried to use the provided format, e.g. my "i:s", as it would then correctly parse the right value. It can fall back to this generic if necessary.
The text was updated successfully, but these errors were encountered: