My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2538: FullCalendar title is resetting to the current date(today's date)
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Aug 2015


Sign in to add a comment
 
Reported by mahesh.d...@gmail.com, Jul 2, 2015
I'm using the Angular fullcalendar with typescript. I'm using the resourceDay view and I have configured the calendar as shown below:

calendarConfig: FullCalendar.Options = {
        allDaySlot: false,
        allDayDefault: false,
        defaultDate: this.date,
        lang: 'en', 
        height: 400,
        header: {
            left: '',
            center: 'title',
            right: ''
        },
        defaultView: 'resourceDay',
        editable: true,
        resources: this.resources,
        events: this.events,
        timeFormat: 'HH(:mm)',
        axisFormat: 'HH:mm',
        scrollTime: this.date.getHours() + ':' + this.date.getMinutes() + ':' + this.date.getSeconds(),// This will automatically scroll to the current time.
        eventClick: (event: CalendarEvent, jsEvent: MouseEvent, view: FullCalendar.View) => { this.eventSelected(event, jsEvent, view); }           
    }
Here i'm updating the calendar's date by using the 'gotoDate' method of fullcalendar with an external datepicker control like follows:

$('#calendar').fullCalendar('gotoDate', this.date);
Here before executing the above statement i'm re-linking the events and resources by getting them from backend, to display updated ones.

this.calendarConfig.resources = this.resources;
this.calendarConfig.events = this.events;
This re-linking causes the title to display the current date instead of selected date but calendar is displayed with the selected day's events.

Please help me how can i update the resources and events without affecting the title.
Aug 2, 2015
Project Member #1 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Invalid
Sign in to add a comment

Powered by Google Project Hosting