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

double div datepicker when fired domready #153

Open
pelikanek opened this issue Mar 12, 2014 · 1 comment
Open

double div datepicker when fired domready #153

pelikanek opened this issue Mar 12, 2014 · 1 comment

Comments

@pelikanek
Copy link

Hello, thanks for great datepicker! I found some error when I must use this code after ajax request:

window.fireEvent('domready');

It created another div with class="datepicker", so many div with this class do some wacky result. I fix it with this code (I clear every your hidden datepickers before running Picker class):

$$('.datepicker').each(function(el) {  
  if (el.getProperty('aria-hidden') != null) el.destroy();
});

and then I use normal code...

new Picker.Date.Range($$('.datepicker_datum_range'), {
    timePicker: false,
    columns: 3,
    positionOffset: {x: 5, y: 0}
});
@SergioCrisostomo
Copy link
Collaborator

@pelikanek can you reproduce your problem in a jsFiddle?
On a fast look at the source I didn't find any domready event handler that could be listening....

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