我在日期点击事件中添加了一些CSS类,为所选日期提供了一些背景颜色 但是,当用户单击prev,next或today按钮时,添加的类将被删除,之前的颜色将被丢失。即使按下按钮,我如何保留所选颜色
$('#calendar1').fullCalendar({
locale: userlang,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
dayClick: function(date, jsEvent, view) {
debugger;
alert('Clicked on: ' + date.format());
component.set('v.selecteddate1', date.toISOString());
console.log('selected val--->'+component.get("v.selecteddate"));
//alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
alert('Current view: ' + view.name);
// change the day's background color just for fun
$(this).css('background-color', 'orange');
},
editable: true,
events: data,
eventClick: function(event,jsEvent, view) {
debugger;
//alert(event.url);
console.log('event url:'+event.url);
console.log('event starttime:'+event.StartDateTime);
//component.find("expdate1").set("v.selecteddate",event.StartDateTime);
alert('test'+view.name);
component.set()
},
eventMouseover: function(event, jsEvent, view) {
$(jsEvent.target).attr('title', event.title+' '+'Hora de inicio:'+new Date(event.start).toDateString()+' Hora de finalización: '+new Date(event.end).toDateString());
}
//alert('Hello'+paramvalueget);
});