mootools-datepicker icon indicating copy to clipboard operation
mootools-datepicker copied to clipboard

bug with init time fields + fix

Open Adidi opened this issue 12 years ago • 1 comments

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));

Adidi avatar May 09 '12 23:05 Adidi

It worked for me!

didoo avatar Jul 10 '12 23:07 didoo