We are using the jquery fullcalendar v2. I need to set the defaultDate of the MonthView based on the start date of the calendar view.
- Show a MonthView Calendar to the User. (October 2014 Month)
- Clicking on a date will redirect to a detail page where user can enter the data for that particular date. (detail page)
- When user clicks Cancel from the detail page, need to redirect them to the Calendar with the default month of which they were before coming to this detail page. (comeback to October 2014)
For this I can get the start date of the view (i.e. calView.start), which gives 28th Sep, 2014. When I pass this particular value to the defaultView, it shows September as the default Month, but I need to show October 2014 as default.
$('#calendar').fullCalendar({
theme: true,
editable: true,
disableDragging: true,
disableResizing: true,
defaultDate: calView.start
This was working fine in the previous version when we set as below:
$('#calendar').fullCalendar({
theme: true,
editable: true,
disableDragging: true,
disableResizing: true,
date: calView.start.getDate(),
month: calView.start.getMonth(),
year: calView.start.getFullYear(),
Can someone let me know whether we need to handle it differently?