** Solution to elements duplicates fullcalendar **

FullCalendar is a awesome tool to show appoinments, sometimes when you need load data across json but there is a bit problem “elements duplicate” ¿how to fix this? simulating click “advance – go back” with javascript.

In my case, I needed to click in section, open window, update information, close the window and show the data updated.

Example:

You have initialized your plug in:

var calendar = $('#calendar').fullCalendar({
//Options .....
firstDay: 1,
height: 2400,
slotMinutes: 30,
eventClick: function(calEvent, jsEvent, view) {
// Here I´m open window with shadowbox and ddd function refresh();
refresh();
}
});

You need created a function to simulated “advance – go back”.

function refresh(){
$('#calendar').fullCalendar('prev');
$('#calendar').fullCalendar('next');
}

Note: forum and documentation page has information about this, to me this was the best way.

This is my firts post in english, sorry is my write has problems.

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s