Problems with calendar icon placement
brailateo opened this issue · comments
Two inputs, one of them does not align properly, screenshot on flickr.
https://www.flickr.com/photos/34575286@N00/24709433080/in/datetaken-public/
The call is simple, the calendar from #data_pif has some hidden divs above it, tables... etc, the inputs have no special styles!
$('#dataFactura').Zebra_DatePicker();
$('#data_pif').Zebra_DatePicker();
It's probably that the element the date picker is attached to changes position after the page is loaded. You could call the "update" method once the page is loaded to fix that
No, it's not the changing positions, I put the $('#data_pif').Zebra_DatePicker(); in a setTimeout after 1 second, I load the HTML template before and on success I define the calendars. So ... it's something else. BTW, what update() method?
in console
$('#data_pif').Zebra_DatePicker().update()
TypeError: $(...).Zebra_DatePicker(...).update is not a function
but despite the error, it fixed the position!
So ... it's no problem issuing more $('#data_pif').Zebra_DatePicker() than one?
P.S. îmi place însă că ne conversăm în engleză ... ;-)
Teo
Sorry, I was on the wrong project :-D
I found now:
var datepicker = $('element').data('Zebra_DatePicker');
datepicker.update();
Thanks,
Teo
You should really look into the configuration options ;)
The "update" method is used like this:
var dp = $('selector').Zebra_DatePicker();
then, somewhere else in your code, you might call
dp.update();
P.S. ne conversam in engleza ca sa pot da link-uri catre aceste discutii cand mai au si altii problema asta :)