im using FullCalendar, and i want switch between Showing to not showing weekends and vice versa.
so it's OK when i try to from showings to not showing but when i try to go from a view without weekends to an an other view with weekend (set weekends option to True) my calendar stay without weekends.
<button id="prev" class="fc-prev-button fc-button fc-button-primary" type="button" >Précédent
</button>
<p:remoteCommand name="myCommand" actionListener="#{planningsMBean.loadPrevAction}" style="display: none;" update=":form:statutWeekendId" oncomplete="getStatutWeekend()"/>
in my function javascript
function getStatutWeekend(){
console.log("get statut weekend -------");
var element = document.getElementById("form:statutWeekendId");
console.log("value of statut updated " + element.value);
statutWeekendString = element.value;
console.log(statutWeekendString==='OFF');
if(statutWeekendString==='OFF'){
calendar.setOption('weekends', false);
calendar.prev();
}
console.log(statutWeekendString==='ON');
if(statutWeekendString==='ON'){
console.log("value of option before " + calendar.getOption('weekends'));
calendar.setOption('weekends', true);
calendar.prev();
console.log("value of option after " + calendar.getOption('weekends'));
}
}
so when i get statut weekend to ON and i set Option weekend to true i log that this option is really true but my calendar still not showing weekend.
Thank you for your help.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…