I got new requirement,Using Jquery,Can anyone help me with highlighting color of date(In a week view) in full calendar,when date got selected by a Datepicker.
$(document) .ready(function () {
$(function() {
$( "#datepicker" ).datepicker({
dateFormat: 'dd/mm/yy',
onSelect: function(dateText,inst){
var vals = dateText.split("/"),eventDate =new Date(Number(vals[2]),Number(vals[1]), Number(vals[0]));
//this.dayhighlight = eventDate;
$('#calendar').fullCalendar( 'gotoDate', Number(vals[2]), Number(vals[1])-1, Number(vals[0]));
var eventDate1 =new Date(Number(vals[2]),Number(vals[1])-1,Number(vals[0]));
var reqDate = new Date(eventDate1);
var dd = reqDate.getDate();
var mm = reqDate.getMonth()+1;
var yyyy = reqDate.getFullYear();
dayRender: function(daysOfWeek, cell){
if(reqDate.getDate()==daysOfWeek.getDate())
{
$(cell).addClass('fc-state-highlight');
}
else
{
$(cell).removeClass('fc-state-highlight');
}
}
}
});
});
});
My code functionality is working.It is going to that particular date in a WeekView in FullCalendar but I am unable to highlight that cell color of the date,I am using JQuery v1,here trying to use dayRender() but it is not working,Can anyone help with me this please.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…