trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

Datetimemin error #629

Open dasmod opened 11 years ago

dasmod commented 11 years ago

Hi,

There seems to be an error while handling "mindatetime".

Given a mindatetime (ie. 14:30), if you change the hour to 15, minute pulldown does not insert <30 minutes to select options.

The problem seems to be on the following line:

return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));

$t.data("min") remains "30", o.min=0 therefore 30 is selected.

Can I remove $t.data("min") from this line? (It seems to fix the problem and does not introduce any errors)

trentrichardson commented 11 years ago

It may fix your issue, as far as updating the library on github that will create an issue for others. Sounds like the .data('min') isn't getting updated then the options are changed.

On Wed, Aug 21, 2013 at 7:46 AM, dasmod notifications@github.com wrote:

Hi,

There seems to be an error while handling "mindatetime".

Given a mindatetime (ie. 14:30), if you change the hour to 15, minute pulldown does not insert <30 minutes to select options.

The problem seems to be on the following line:

return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));

$t.data("min") remains "30", o.min=0 therefore 30 is selected.

Can I remove $t.data("min") from this line? (It seems to fix the problem and does not introduce any errors)

— Reply to this email directly or view it on GitHubhttps://github.com/trentrichardson/jQuery-Timepicker-Addon/issues/629 .

Thanks,

Trent Richardson

trentdrichardson@gmail.com

trentrichardson.com