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

Timepicker in modal is updating the field on the page under the modal's timepicker #642

Closed TrevorHinesley closed 11 years ago

TrevorHinesley commented 11 years ago

I have a Date/Time field (for entering a new Game that an athlete will be playing on their schedule), then to edit an old game a modal pops up, and they can change the Date (and time) in the modal. However, when updating the Date in this timepicker (the timepicker for the modal is instantiated upon the modal popup), the Date doesn't update the text field in the modal, it updates the Date for the new Game field on the page under the modal.

However, changing the time itself DOES work on the modal, the date and the "Now" buttons are the only things that don't work so I'm unsure of how to debug this. I tried destroying the #ui-datepicker-div and calling "destroy" on datetimepicker(), but upon instantiating the modal's datepicker after these calls I get a "Uncaught TypeError: Cannot set property 'currentDay' of undefined" when I try to change the date.

Any help is much appreciated!

TrevorHinesley commented 11 years ago

This is resolved, duplicated ID's!