0
我正在使用gem fullcalendar-rails。Rails Fullcalendar IE不會再引發
我使用ajax作爲事件輸入的數據和模態。
活動模式添加新記錄後,我使用fullcalendar refectchevents
在日曆上顯示新事件。這適用於每次我除了IE 9
這裏測試瀏覽器的代碼:
$('#calendar').fullCalendar
ignoreTimezone: true,
editable: true,
defaultView: 'month',
height: 500,
slotMinutes: 30,
selectable: true,
selectHelper: true,
editable: false,
select: (start, end, allDay) ->
title = $("#title")
description = $("#description")
hours = $("#hours")
workorder = $("#workorder_id")
actcode = $("#actcode_id")
$("#dialog-form").dialog
autoOpen: true
height: 500
width: 400
modal: true
buttons:
"Create Labor": ->
$.create "/events/",
event:
workorder_id: workorder.val(),
actcode_id: actcode.val(),
title: title.val(),
description: description.val(),
hours: hours.val(),
starts_at: "" + start,
ends_at: "" + end,
all_day: allDay,
maxsynch: "N",
employee_id: $('#calendar').data('employeeid'),
overtime: "TRUE" if $("#overtime").is(":checked")
$(this).dialog "close"
$('#calendar').fullCalendar('refetchEvents')
UPDATE1
我改變了下面 - 但是,它並沒有解決它。
eventSources: [{
url: '/events',
cache: false,
}],
UPDATE2
這工作:
...
employee_id: $('#calendar').data('employeeid'),
overtime: "TRUE" if $("#overtime").is(":checked")
complete: ->
$('#calendar').fullCalendar('refetchEvents')
感謝您的幫助。你的events_function代碼是什麼樣的? – Reddirt
我正在使用json,這裏是一個來自fullcalendar的引用'_參數被自動插入,以防止瀏覽器緩存結果(更多詳情)。' – Reddirt
我使用了以下工具:'complete: - > $ ( '#calendar')。fullCalendar( 'refetchEvents') – Reddirt