meteor - Calendar Month and Year Not changing on dropdown year and month -


i using rzymek:fullcalendar package. create select list using semantic ui dropdown

<div class="ui compact selection dropdown">       <i class="dropdown icon"></i>       <div class="text">compact</div>       <div class="menu">           <div class="item">january 2015</div>       </div> </div> 

create calendar (call fullcalendar template):-

<div class="calendar">     {{>fullcalendar options id="mycalendar"}} </div> 

changing calendar month , year this:-

$('.ui.selection.dropdown')     .dropdown('restore default text')         .dropdown({             onchange: function (val) {                 var monthandyear = val.split(" ");                 console.log(monthandyear[0]);                 var today = new date();                  session.set('date'monthandyear[1]+'-0'+monthlist.indexof(monthandyear[0]));                 $('#mycalendar').fullcalendar({                     gotodate: moment(session.get('date')),                 });             }         }); 

but it's not working. don't know why ?

after template class calendar has been added html can use $('#mycalendar').

if calendar rendered can't use:

$('#mycalendar').fullcalendar({gotodate: moment(session.get('date'))});  

to go date might want call:

$('#mycalendar').fullcalendar('gotodate', moment(session.get('date'))); 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -