TimePicki
TimePicki copied to clipboard
When picking minutes, value sets to "0"
Hi,
when picking minutes "00", it turns into "0", on the destination input. Checking your code, you have a small bug that turns the value into number before concatenate into a string.
The excerpt of code is the following:
https://github.com/senthilraj/TimePicki/blob/d4019e213a96763df37c27bb10397e4305996aa8/js/timepicki.js#L33-L38
I don't know why are you repeating the math operations here, but it makes no sense to do it after you left padding the number.
Regards, Fernando
Just delete that duplicate line
mini = Math.min(Math.max(parseInt(mini), 0), 59);