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 return null on getDate, when not clicking done #682

Open gperler opened 10 years ago

gperler commented 10 years ago

I use the time picker only. If I initially choose a time without clicking 'now' or 'done' (closing the widget by clicking somewhere else on the screen), the getDate function returns null. Although a time is displayed in the input.

However this only occurs only at the first time. If I reopen the time picker and still don't click 'now' or 'done', the getDate function works fine.

var timepicker = $('#timepicker').timepicker();

$("#click").click(function() { console.dir(timepicker.datepicker('getDate')); });