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

"hasChanged" detection bug #627

Open janousek opened 11 years ago

janousek commented 11 years ago

In function "_onTimeChange", there is bug in checking of change of date. Line:

timezone = (this.timezone_select) ? this.timezone_select.val() : false,

returns string (or bool). But "this.timezone" is number. That is why condition "timezone !== this.timezone" is always true. There should be:

if (timezone !== false) {
    timezone = parseInt(timezone, 10);
}