jsf 2 - call schedule function from client side -
i want change view month agenda in primefaces schedule component js function in xhtml. possible? tried following code not works
function movetoday(date){  var todate = new date(date);  alert(todate);  $('#schedule').fullcalendar( 'changeview', 'agendaday' );  $('#schedule').fullcalendar( 'gotodate', todate ); }   here 'schedule' id of p:schedule component, should change #calendar in function? suggestions?
assuming schedule widgetvar schedulewv.
 <p:schedule widgetvar="schedulewv" >     as pirmefaces generates fullcalendar adds outer div form original div of fullcalendar jquery object, taking in consider function this.
function movetoday(date){    //fullcalendar first child of component     myfullcal = pf('schedulewv').jq.children(":first");     var todate = new date(date);    myfullcal.fullcalendar( 'changeview', 'agendaday' );    myfullcal.fullcalendar( 'gotodate', todate ); }   hope helps.
Comments
Post a Comment