date.getDate() is not a function. (In 'date.getDate()', 'date.getDate()' is undefined) FullCalendar in Ionic 3

Viewed 25615

I'm coding on a Ionic 3 project where i use a FullCalendar plugin for display a calendar ui. I've a problem with this code in the module of page when i try to change background of a single day on calendar. I've used dayRender function of FullCalendar.

$('#calendar').fullCalendar({

            dayRender: function (date, cell) {
              var today = new Date('2017-09-11T00:40Z')
              if (date.getDate() == today.getDate()) {
                  this.cell.css("background-color", "red");
              }
            },
});

I've this Runtime error in output:

date.getDate() is not a function. (In 'date.getDate()', 'date.getDate()' is undefined) FullCalendar in Ionic 3

so i don't understand why, because date is a Date object that was already defined in FullCalendar library.

Any Solutions?

ps: Sorry for my bad english.

1 Answers
Related