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

Adding custom afterShow to Jquery UI generates 'Maximum call stack size exceeded' #913

Closed ashimakochar closed 7 years ago

ashimakochar commented 7 years ago
Below is the code added and its causing the stack trace exceeded at second line i.e. $.datepicker._updateDatepicker = function(inst) :-

$.datepicker._updateDatepicker_original = $.datepicker._updateDatepicker; $.datepicker._updateDatepicker = function(inst) { $.datepicker._updateDatepicker_original(inst); var afterShow = this._get(inst, 'afterShow'); if (afterShow) { afterShow.apply((inst.input ? inst.input[0] : null));
} }

ashimakochar commented 7 years ago

Do not add the code to document.ready as this creates the above exception