mootools-datepicker
mootools-datepicker copied to clipboard
bug with init time fields + fix
I install the datepicker with timePicker:true and every time the "time" dialog is shown the values in the hours/minutes inputs are "00" The problem caused i guess because of closure and my fix is: line 517 in Picker.Date.js
if (isUnavailable('date', date, options)) element.addClass('unavailable');
else element.addEvent('click', fn.pass(date.clone()));
define the date.clone before the "if" will make it work:
var date_clone = date.clone();
if (isUnavailable('date', date, options)) element.addClass('unavailable');
else element.addEvent('click', fn.pass(date_clone));
It worked for me!