jquery - fullcalendar viewRender Not working for me -


hi guys i'm using arshaw fullcalendar great plugin , notified when view changes in order add class span. tried

    $('#calendar').fullcalendar({         viewrender: function(view,element){alert("aha");},             defaultview:'basicday',             theme: true,             header:{                      right: 'month basicweek basicday',                     left: 'prev,next today',                     center: 'title'              },             loading: function(bool){                     if(bool){                     $("body").addclass("loading");              }else{                     $("body").removeclass("loading");                     }             },             lazyfetching: true,             mintime: 8,             maxtime: 17,             alldayslot: false,             eventsources:[              {                     url: '/apptcalendar/appt?q=1',                     color: '#faf29b',                     textcolor: 'black',                     alldaydefault: false             },             {                     url: '/apptcalendar/appt?q=2',                     color: '#4e394d1',                     textcolor: '#faf29b',                     alldaydefault: false             },                             {                     url: '/apptcalendar/appt?q=3',                     color: '#38df64',                     textcolor: 'black',                     alldaydefault: false             }       ],     eventrender: function(event, element){         element.find('span.fc-event-title').html(element.find('span.fc-event-title').text());             element.qtip({                     content: {text:"<script>$('.qtip .addtitleinfo').addclass('hidden'); $(document).ready(function(){ $('#eventapptid"+event.id+"').each(function(){  $('#eventapptid"+event.id+"').val('"+event.appstatusid+"'); });  });</script><div><h6>therapy type: "+event.therapytype+"</h6></div><a href='/eval/new-eval/"+event.pat_id+"?appid="+event.thirdpappid+"'"+"><i class='icon-plus-sign'></i> new eval</a><br>\                     <a href='/note/new-note/"+event.pat_id+"?appid="+event.thirdpappid+"'"+"><i class='icon-plus-sign'></i> new note</a>\                     <div>dob: "+event.dob+"</div><div>ssn: "+event.l4ssn+"</div><div>appointment status:</div><select id='eventapptid"+event.id+"' class='input-large' onchange='updateapptstatus(this.value,"+event.id+","+event.pat_id+")'>"+items+"</select><div>comments: "+event.description+"</div>",                     title: {text: event.title},                     button: 'close'},                     show: {                             solo: true                     },                     style: {                             classes: 'qtip-bootstrap',                             width: 300,                             height: 300                     },                     hide: {                             event: 'unfocus',                     },                     position:{                             my: 'bottom center',                             at: 'top center',                             target: 'event',                             viewport: $('#calendar')                     }             });     } 

});

and did not prompt alert when view changed. to. can me out?

currently have tried other methods of notification have not been able work. please let me know need done.

the problem seems version of fullcalendar library. particular issue got me spinning while :(. 1 included in fiddle v1.6.2. couldn't trigger 'viewrender' callback version. checked same code v1.6.3 , triggered event. on doing diff of 2 versions, found following code block (which seems extremely relevant problem) missing in v1.6.2:

trigger('viewrender', currentview, currentview, currentview.element); 

within _renderview() function. noted v1.6.3 depends on jquery v1.10.2 (although i'm not sure if not work lower versions) if not tied down specific version of jquery, include latest fullcalendar , should go...


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -