Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with init time fields + fix #116

Open
Adidi opened this issue May 9, 2012 · 1 comment
Open

bug with init time fields + fix #116

Adidi opened this issue May 9, 2012 · 1 comment

Comments

@Adidi
Copy link

Adidi commented May 9, 2012

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));
@didoo
Copy link

didoo commented Jul 10, 2012

It worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants