layui us some very convenient packaging components, it is one of four components
Here we take a direct show calendar component on the page to illustrate
The above page turning buttons corresponding to the month and year
HTML section, only acess to write a div assembly
<div id="test"></div>
Then introduced js
Here to correspond to your own address layui.js
<script src="layui/layui.js"></script>
Code section
layui.use(['element', 'laydate'], function () {
var laydate = layui.laydate;
laydate.render({
elem: '#test'
, position: 'static'
});
});
Layui framework introduced simple steps to achieve a simple calendar function