TimePicki icon indicating copy to clipboard operation
TimePicki copied to clipboard

When picking minutes, value sets to "0"

Open lemano opened this issue 7 years ago • 1 comments

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

lemano avatar Mar 13 '18 09:03 lemano

Just delete that duplicate line

mini = Math.min(Math.max(parseInt(mini), 0), 59);

ilidan85 avatar May 20 '18 14:05 ilidan85