文档 https://www.helloweba.net/javascript/231.html
1.安装fullcalendar;
npm install moment 日历插件引入
npm install fullcalendar 日历插件
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>日历</title>
<link rel="stylesheet" type="text/css" href="/static/node_modules/fullcalendar/dist/fullcalendar.css">
<script src="/static/node_modules/jquery/dist/jquery.min.js"></script>
<script src="/static/node_modules/moment/moment.js"></script>
<script src="/static/node_modules/fullcalendar/dist/fullcalendar.min.js"></script>
<script src="/static/node_modules/fullcalendar/dist/locale/zh-cn.js"></script>
</head>
<body>
<div id="calendar"></div>
<script>
$(function() {
//页面加载完初始化日历
$('#calendar').fullCalendar({
//设置选项和回调
})
});
</script>
</body>
</html>
网友评论