After Init
Issue #13
resolved
Callback for after the calendar is rendered. On Init, renders before days are loaded.
Comments (3)
-
repo owner -
repo owner - changed status to resolved
-
It's very useful to add after initialize callback use case:
$('.responsive-calendar').responsiveCalendar({ onDayClick: dayClick, afterInit: function(){ setClicked(getUrlParameter('date')); }, allRows: false }); function setClicked(date){ parts = date.split('-'); $element = $('a[data-year="'+parts[0]+'"][data-month="'+(parts[1]-1)+'"][data-day="'+parts[2]+'"]'); if($element.parent().is('.not-current')){ return; } if($element.parent('div.day.future, div.day.today').length > 0){ $('div.clicked').removeClass('clicked'); $element.parent().addClass('clicked'); } }
- Log in to comment
Hi, can You describe the situation You are facing in more detail?
I will consider adding another callback anyway, but it would be helpful if you could describe me how it will help you?