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

Input loses focus when typing with picker open #848

Open brettwebster opened 8 years ago

brettwebster commented 8 years ago

v1.6.1 (Chrome 46. Does not replicate in FF42 or IE11)

http://jsfiddle.net/brettwebster/L3BNw/60/

focus is handled differently in v1.3.1 http://jsfiddle.net/brettwebster/L3BNw/

matjazpotocnik commented 8 years ago

Confirming.

RipAbyss commented 8 years ago

To overcome this issue, I simply commented one line in jquery-ui-timepicker-addon.js :

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

If it helps...

matjazpotocnik commented 8 years ago

Yes, it helps, thank you!

kindkaktus commented 8 years ago

+1

Commenting out setSelectionRange() also fixes the following issues for me:

  1. "Unspecified error" in IE when changing time in date/time ranges (reproduces in IE11)
  2. Date time picker steals the focus from "autofocus" input on page load (reproduces in Chrome 47.0.2526.111 m)
AdamWillden commented 8 years ago

+1

Krokador commented 8 years ago

+1 here too. It was messing with the input mask as well in a really annoying way.

JakubSvestka commented 8 years ago

+1 helped me too. Thanks

ahammani commented 8 years ago

+1 Thanks a lot.

hcharley commented 8 years ago

+1 +1

luisjuniorj commented 8 years ago

+1

tstackhouse commented 8 years ago

+1

kakutuzov commented 7 years ago

+1