How to add background color for different dates of calendar using jquery?

时间:2015-06-26 09:38:34

标签: jquery

 $('#calendar').fullCalendar({
      header: {
          left: 'prev,next today',
          center: 'title',
          right: 'month,basicWeek,basicDay'
      },

      defaultView: 'month',

      dayRender: function (date, cell) {
          var today = new Date();
          if (date.getDate() === today.getDate()) {
              cell.css("background-color", "red");
          }
      }
  });

0 个答案:

没有答案