trentrichardson/jQuery-Timepicker-Addon — Issue #310: Time not set after clearing input field.
Author: mobermeyer
Created: 2012-01-26 14:36:07+00:00
State: open

Hello, first, thanks for a great addon! I've found behavior in the timepicker that I find unusual, but I am not sure if it is a genuine issue or an intended feature.

The scenario is this:

Precondition: The input field has a date time or time value already set (whether by default, or previously set via the picker).

Action: Open the time picker and delete the text from the input field (deleting the text can be done before or after moving the sliders)

Result: Moving the slider after deleting the input field text fails to repopulate the time.

I noticed that jQuery's date picker will still set the date after deleting the input field text, and thought it made sense to do so with the time picker. I found removing (commenting out) the return command, and the condition that allows it to be called around line 950 fixed the issue. (The condition, by the way, describes exactly the scenario above) The only thing is, I haven't really looked into the code of the timepicker addon that extensively, and I am not sure if this causes an issue somewhere else. It seems to work for my needs on the site I am working on.

Again, thanks for supplying this useful tool!