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

altField relative to the DateField #937

Open arbyter1 opened 6 years ago

arbyter1 commented 6 years ago

I am trying to extend all Inputs having type=data like so: $(document).ready(function (){$('[type=date]').datetimepicker(); This works great. having multiple date - and timefileds in a list on the same page i can not profit from the very innovative option "altField". I patched jquery-ui-timepicker-addon.js so i can give a callback function instead of an ID for the altField Example: $(document).ready(function (){$('[type=date]').datetimepicker({altField:timefield}).val(); }) function timefield(p){ return $(p.$input).closest('td').next('td').find('input')};