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

_updateDatepicker, multiple datepicker instances #742

Open kevans91 opened 10 years ago

kevans91 commented 10 years ago

I have a scenario where I have one inline datepicker showing at all times, and then multiple popup datepickers (with timepickers spread amongst them) throughout a form.

The version of _updateDatepicker provided by this timepicker addon (query-ui-timepicker-addon.js:1416) blocks redrawing of a widget if there's another instance already opened. This erroneously blocks drawing when one of datepickers in question is inline, as an inline datepicker and a popup datepicker are not mutually exclusive..

My fix for this was adding "!$.datepicker._curInst.inline && !inst.inline" so that if one of the instances in question is inline, it still goes through.