gijgo
gijgo copied to clipboard
Multiple instances of Datepicker on same page not working
Hi there,
there is an issue with multiple instances of datepicker. If for example i initiate datepicker with a class name like
$('.datepicker').datepicker();
<input class="datepicker" />
<input class="datepicker" />
the datepicker popup is closing itself after about 1 second. It also lacks of self-referencing the input element, instead it references all elements with the class ".datepicker" and all inputs are getting the same date when selecting from the picker.
It works when referencing by id but thats no option for me as this results in senseless code overhead.
This is a bug and we are going to fix it in future versions. Please use a referance by id as a temporary solution.
I figured this out today. Easiest workaround is:
$('.datepicker').each(function()` {
$(this).datepicker()
});
Thanks zulus!
Running into this issue today, how does it go with a fix?
it continues to happen