0

I have a problem with event UI when i am dragging(Not drop yet) event first time. It does not move column to column; instead it's dragging like this:

enter image description here

But once I dropped (it set proper place) that event and again started dragging it so it drags column to column perfectly.

After refreshing the page only the first time this problem occurs. But if I clicked on today button before dragging any event so it works fine for me even if I drag event the first time.

I found if _loadCalEvents(new Date()); function is called this problem is solved (call on today button)

SO please help me how to call this function on my jsp page after calendar render.

Jack Bonneman
  • 1,821
  • 18
  • 24
HybrisHelp
  • 5,518
  • 2
  • 27
  • 65
  • What if you refresh the calendar just after the page is tottaly rendered ? Do you still have the glitch ? – TCHdvlp Aug 09 '13 at 13:08
  • yes after each refresh first time this problem occur (if i click on `today button` before dragging any event first time ,this problem not occur) – HybrisHelp Aug 10 '13 at 03:42
  • I found that once `_loadCalEvents(date);` is called this is solved and this function call by `Today button ` .. So i wonder hot to call this function on load time – HybrisHelp Aug 10 '13 at 04:22
  • @U2Answer Can you tell me How Event can be prevented from Dropping at Blocked Business Hours – yash Sep 20 '16 at 13:10

2 Answers2

2

Call $('#yourCalendarDiv').fullCalendar('render'); after rendering your modal/dialog.

It immediately forces the calendar to render and/or readjusts its size.

Probably, you are creating your calendar before rendering the modal, so the calendar does not know its size. After dragging for the first time, or clicking to switch the view (today button), the calendar is adjusting its size, that's why it works.

Refer to FullCalendar/Docs/Render

john 4d5
  • 731
  • 6
  • 11
1

Lastly i have solve this by calling

$('#calendar').weekCalendar("today");

after calendar load .Its render all events for this current week.So solve problem on dragging .

HybrisHelp
  • 5,518
  • 2
  • 27
  • 65