我正在使用jQuery FullCalendar(http://arshaw.com/fullcalendar/docs/) 我已经'画了'' callendar但我无法找到一种方法来插入我从数据库中带来的数据。 我使用周格式的callendar,我需要对它进行一些约会。我正在阅读文档,但无法弄清楚。
到目前为止我的代码:
<!DOCTYPE html>
<html>
<head>
<title>Calendario</title>
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src='calendario/lib/moment.min.js'></script>
<script src='calendario/fullcalendar.js'></script>
<script src='calendario/lang/pt-br.js'></script>
<link rel='stylesheet' href='calendario/fullcalendar.css' />
<script type="text/javascript">
$(document).ready(function(){
//Page is now ready, initialize calenda.
$('#calendario').fullCalendar({
defaultView: 'agendaWeek',
height: 350,
header: false,
firstDay: 1,
weekends: false,
events: [
{
title: 'Event1',
start: '2016-03-08',
end:'2016-03-08T20:00'
}
]
})
});
</script>
</head>
<body>
<div id="calendario"></div>
</body>
</html>
不行,但有没有办法在events:[]
内使用其他日期格式?
答案 0 :(得分:0)
要插入数据,请将“事件”选项添加到日历初始化中。您还缺少包含jQuery UI的脚本元素。