Issue 697: jQuery Sortable duplicates Calendar
Status:  Done
Owner: ----
Closed:  Nov 2010
Reported by dan%smar...@gtempaccount.com, Nov 1, 2010
I've been implementing a sortable list of widgets one of which being this calendar control. All's fine except when I move the Calendar control the Calendar itself is duplicated. I've been unable to see why this is, but having a check for the table.fc-header class before the main js code works for me:

	if ($('#calendar table.fc-header').length == 0) {
		$('#calendar').fullCalendar({
			theme: true,
			header: {
				left: 'title',
				right: ' today,prev,next'
			},
			editable: false,
			events: <%= Model.Events %>
		});
	};

I am using the following jQuery js files:
  jquery-1.4.2.js
  jquery-ui-1.8.2.custom.js
and the following ajax files
  MicrosoftAjax.debug.js
  MicrosoftMvcAjax.debug.js

The table (class = fc-header) and the div (class = fc-content ui-widget-content) become duplicated so the html goes

<div id="calendar" class="fc ui-widget">
  <table class="fc-header">....</table>
  <div class="fc-content ui-widget-content" style="...">...</div>
  <table class="fc-header">....</table>
  <div class="fc-content ui-widget-content" style="...">...</div>
</div>

Nov 21, 2010
Project Member #1 adamrs...@gmail.com
can't really be too sure, but this doesn't sound like the root cause is fullcalendar, sounds more related to your use of jquery ui. maybe you are using a clone helper and that is messing it up. anyways, sorry i cant help
Status: Done