Closed jonathanmcc closed 10 years ago
it marks the 00:00:00 of last day of each month as the end of month, which means anything happens that day is not included.
I'd disagree: new Date(this.options.position.start.getFullYear(), month + 1, 0, 0, 0, 0)
should mark as (exclusive) end the 00:00:00 of the first day of the next month...
That's what I thought when I saw that line :(
I've added console.log(new Date(this.options.position.start.getFullYear(), month + 1, 0, 0, 0, 0));
in the function, and here is the output when I click the year view:
You're right! The correct code should be new Date(this.options.position.start.getFullYear(), month + 1, _1_, 0, 0, 0)
I fixed the code (see https://github.com/Serhioromano/bootstrap-calendar/commit/bd05e9fb107772945127e65a96088aa82983102d ). Thank you!
Glad to help :smiley:
Year view doesn't show the events on last day of each month due to this line:
in the function
Calendar.prototype._month
it marks the 00:00:00 of last day of each month as the end of month, which means anything happens that day is not included.
Suggestions:
This should do the fix