0
A
回答
1
我相信同事的礦用dayRender
幾天前爲此確切的目的。
像這樣的東西可能會工作,但它是未經測試的代碼。
dayRender: function (date, cell) {
cell.text(moment(date).format('DD'));
}
我們正在使用moment.js庫格式化單元格上的日期。
0
這就是我使用的,它有點複雜,但你可能會找到你想要做的。 它使用一個JS函數來改變提供給FullCallendar的事件列表和一個JS鉤子以在特定事件上添加一個html標記(Glyphicon)。
// JSON of all events
var allEvents = <?php echo $json; ?>;
// set the fullCalendar
$('#calendar').fullCalendar({
header: {
left: '',
center: 'title',
right: 'prev,next today'
},
weekends:false,
fixedWeekCount:false,
// our own JS function to filter the event
events: function(start, end, timezone, callback) {
var filteredEvents = [];
var noDuplicateAssignment = [];
// we walk on every event to filter every duplicate
$.each(
allEvents,
function (key, oneEvent) {
// we just display allUnique
if (noDuplicateAssignment.indexOf(oneEvent.id) < 0) {
filteredEvents.push(oneEvent);
noDuplicateAssignment.push(oneEvent.id);
}
}
);
// we supply our events to the fullCalendar callback
callback(filteredEvents);
},
// hook to add the glyphicon on electronic==TRUE event
eventRender: function (event, element) {
if(event.electronic)
element.find('.fc-content').prepend(
'<i class="glyphicon glyphicon-envelope"></i> '
);
}
});
如果你正在談論的內容,最好是使用JSON格式的輸入數據。
使用Json,您可以編輯JavaScript Json對象並調用此新對象的渲染以獲得您想要的效果。 http://fullcalendar.io/docs/event_data/events_array/
相關問題
- 1. 是否可以在加載後更改UITabBarController文本顏色?
- 2. FullCalendar - 是否可以更改結束時間的位置?
- 3. 是否可以更改xib文件?
- 4. 是否可以在將SQLParameter添加到SQLCommand後更改其值?
- 5. 是否可以使用jQuery添加或更改CSS屬性?
- 6. 是否可以添加類?
- 7. 是否可以用$ ionicPopup.confirm()更改按鈕的文本?
- 8. 是否可以將「Up」圖標更改爲文本(ActionBarSherlock)?
- 9. 是否可以更改xml按鈕上的文本?
- 10. IOS5是否可以更改雙高狀態欄的文本?
- 11. Bigcommerce - 在函數執行後是否可以更改文本?
- 12. 是否可以在聲明後更改GUI按鈕的文本?
- 13. 是否可以使用nsis腳本更改bat文件的值?
- 14. 是否可以在運行中更改工具提示文本?
- 15. 是否可以更改Gtk.MessageDialog標題文本的位置?
- 16. 是否可以在richtextbox中更改文本的位置?如何?
- 17. 是否可以更改樣式中的文本字體
- 18. 是否可以向listGrid過濾器添加默認文本?
- 19. 是否可以將效果添加到TextView中的文本?
- 20. 是否可以向UITextView添加文本的偏移量?
- 21. 是否可以將本地依賴添加到.podspec文件?
- 22. 是否可以將文本添加到Bing Map(AJAX)的頂層?
- 23. 是否可以爲磁盤可用容量更改添加事件偵聽器?
- 24. Outlook添加:是否可以以編程方式放棄對mailItem的更改?
- 25. 設置不同文本時是否可以更改文本顏色?
- 26. 腳本是否可以更改腳本運行的bash的cwd?
- 27. 是否可以動態更改PolyLine.strokeThickness值?
- 28. 是否可以更改BaseViewID的值?
- 29. 是否可以更改npm用戶?
- 30. 是否可以用JavaScript更改document.readyState?
你在說這個https://github.com/fullcalendar/fullcalendar嗎? (可以肯定) – Blag
這就是實際! – miechooy