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

setSelectionRange: Object doesn't support this property or method #846

Open ltdeta opened 8 years ago

ltdeta commented 8 years ago

using version 1.6.1 tested with IE8

   var $dp = $jq(this).datetimepicker({
                  showOn: "button",
                  changeMonth: true,
                  changeYear: true,
                  controlType: $jq.fn.datepickerSlider });

with version 1.55 it works fine now bushing the picker-button getting the following error

jquery-ui-timepicker-addon.js on line 887 ´Object doesn't support this property or method`

887  this.$timeObj[0].setSelectionRange(sPos, ePos);

sPos and ePos are undefined on line 879 , 880

879 var sPos = this.$timeObj[0].selectionStart;
880 var ePos = this.$timeObj[0].selectionEnd;
ltdeta commented 8 years ago

setSelectionRange is only supported in IE9+. please add check for setSelectionRange calls