我目前還使用fullcalendar,這裏是一些我已經做了定製:
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
//Changing the header like this:
header:
{
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
//Lets us edit in the calendar
editable: true,
//When u select some space in the calendar do the following:
select: function(start, end, allDay){
//do something when space selected
},
//When u click on an event in the calendar do the following:
eventClick: function(event, element) {
//do something when event clicked
},
//When u drop an event in the calendar do the following:
eventDrop: function(event, delta, revertFunc) {
//do something when event is dropped at a new location
},
//When u resize an event in the calendar do the following:
eventResize: function(event, delta, revertFunc) {
//do something when event is resized
},
//Add some test events.
events: [
{
title : 'event1',
start : '2016-09-15'
},
{
title : 'event2',
start : '2016-09-15',
end : '2016-09-16'
},
{
title : 'event3',
start : '2016-09-15T12:30:00',
allDay : false // will make the time show
}
]
})
});
在我的項目我也使用PHP和MySQL的存儲和改變事件。否則,幾乎所有你能做的定製是listed in the docs.
編輯#1 這裏去如何改變基本顏色設置等: 改變孔背景色:
<div id="calendar" style="background:#de1f1f;"></div>
改變事件的背景顏色(當ü拖動一個新的事件的背景不藍了,但紅):
$(document).ready(function() {
$('#calendar').fullCalendar({
eventBackgroundColor: "#de1f1f"
});
});
改變事件的顏色(不是藍色了,但紅):
$('#calendar').fullCalendar({
events: [
// my event data
],
eventColor: "#de1f1f"
});
改變了事件的邊框顏色:
$('#calendar').fullCalendar({
eventBorderColor: "#de1f1f"
});
希望,只是澄清了一些你可以做定製的,現在包括如何風格吧:)
是[角UI -bootstrap]標籤真的有必要嗎? – svarog
你能否詳細說明你想要自定義的內容? :日曆行爲?顏色? –
@svarog嗨,正如我所說我是新的,我認爲angular-ui-bootstrap是fullcalendar庫所必需的 –