My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1244: Remove all elements on month change
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Aug 2013


Sign in to add a comment
 
Reported by bitmovel, Jan 13, 2012
hi! :)

I have a huge list of events generated, so i want to clear all to avoid duplicated before adding new events, but they keep duplicated

here is my html code:

<script>
	function clear_calendar() {
		var date = $('#calendar').fullCalendar( 'getDate' );
		var mes_actual = date.getMonth();
		var ano_actual = date.getFullYear();
		source_actual = 'includes/lista_eventos.php?mes=' + mes_actual + '&ano=' + ano_actual;
		$('#calendar').fullCalendar( 'removeEventSource', source_actual );
	}
	function mes_anterior() {
		$('#calendar').fullCalendar( 'removeEvents' );
		$('#calendar').fullCalendar( 'rerenderEvents' );
		$('#calendar').fullCalendar( 'prev' );
		var date = $('#calendar').fullCalendar( 'getDate' );
		var mes_prev = date.getMonth() + 1;
		var ano_prev = date.getFullYear();
		source_prev = 'includes/lista_eventos.php?mes=' + mes_prev + '&ano=' + ano_prev;
		$('#calendar').fullCalendar( 'addEventSource', source_prev );
	}
	function mes_seguinte() {
	
		$('#calendar').fullCalendar( 'next' );
		var date = $('#calendar').fullCalendar( 'getDate' );
		var mes_next = date.getMonth() + 1;
		var ano_next = date.getFullYear();
		source_next = 'lista_eventos.php?mes=' + mes_next + '&ano=' + ano_next;
		$('#calendar').fullCalendar( 'addEventSource', source_next );
	}
</script>

			<input type="submit" onclick="clear_calendar(); mes_anterior();" value="Mês Anterior"/>
			<input type="submit" onclick="clear_calendar(); mes_seguinte();" value="Mês Seguinte"/>
			<div id='calendar'></div>
Jan 13, 2012
#1 bitmovel
Allow me to remember that mes_anterior() and mes_seguinte() are working perfect!

but when clicking on next month and go back to previous month, i get events duplicated.

I have also tested this, but no success:

<script>
	function clear_calendar() {
		$('#calendar').fullCalendar( 'removeEvents' );
		$('#calendar').fullCalendar( 'rerenderEvents' );
	}
	function mes_anterior() {
		$('#calendar').fullCalendar( 'prev' );
		var date = $('#calendar').fullCalendar( 'getDate' );
		var mes_prev = date.getMonth() + 1;
		var ano_prev = date.getFullYear();
		source_prev = 'includes/lista_eventos.php?mes=' + mes_prev + '&ano=' + ano_prev;
		$('#calendar').fullCalendar( 'addEventSource', source_prev );
	}
	function mes_seguinte() {
		$('#calendar').fullCalendar( 'next' );
		var date = $('#calendar').fullCalendar( 'getDate' );
		var mes_next = date.getMonth() + 1;
		var ano_next = date.getFullYear();
		source_next = 'lista_eventos.php?mes=' + mes_next + '&ano=' + ano_next;
		$('#calendar').fullCalendar( 'addEventSource', source_next );
	}
</script>

			<input type="submit" onclick="clear_calendar(); mes_anterior();" value="Mês Anterior"/>
			<input type="submit" onclick="clear_calendar(); mes_seguinte();" value="Mês Seguinte"/>
			<div id='calendar'></div>
Aug 14, 2013
Project Member #2 adamrs...@gmail.com
(No comment was entered for this change.)
Status: ReproTemp
Aug 25, 2013
Project Member #3 adamrs...@gmail.com
This message is being bulk-sent to a number of issues, both [very] old and new.

I have been working on taming this issue tracker, which has gotten out of control after months of neglect. You are receiving this message because I could not successfully reproduce the bug you were reporting with a reasonable amount of effort. I have written some new bug-report guidelines to be used by all bug reports going forward:

    http://arshaw.com/fullcalendar/wiki/Report-a-Bug/

Its salient point is that all bug reports should have an isolated demonstration, viewable online with a tool like JSFiddle.

If the bug you originally reported is still important to you, could you please first try the latest version of FullCalendar and see if it is fixed? If not, could you please file a NEW bug report that follows the new guidelines? This issue will not be monitored for further comments.

I'm sorry I have taken so long to respond to many of your request, and I'm sorry if this new procedure causes extra work for you. Going forward, the issue tracker will be much more of a well-oiled machine.

Again, if you must, PLEASE SUBMIT A *NEW* BUG REPORT (following the new guidelines) INSTEAD OF COMMENTING ON THIS ONE. Further comments on this report will be ignored. Thanks.
Status: Invalid
Labels: Type-Bug
Sign in to add a comment

Powered by Google Project Hosting