不要因为一时的失败和挫折,就忘记以往壮志满满说过要去的远方。人皆有爱生恶死之心,人皆为舍生取死之道。何也见善不明耳。
本文实例为大家分享了Jquery Easyui日历组件的实现代码,供大家参考,具体内容如下
加载方式
Class加载
<div id="box" class="easyui-calendar" style="width:200px;height:200px;"></div>
JS调用加载
<div id="box"></div>
<script>
$(function () {
//JS 加载调用
$('#box').calendar({
});
});
</script>
属性列表
<script>
$(function () {
//JS 加载调用
$('#box').calendar({
width : 200,
height : 200,
fit : false,
border : false,
firstDay : 0,
weeks : ['S','M','T','W','T','F','S'],
months : ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
'Sep', 'Oct', 'Nov', 'Dec'],
year : 2016,
month : 6,
current : new Date(2016,12,17),
});
});
</script>
事件列表
<script>
$(function () {
//JS 加载调用
$('#box').calendar({
width : 200,
height : 200,
onSelect : function (date) {
alert(date.getFullYear() + ":" + (date.getMonth() + 1) + ":"
+ date.getDate());
},
onChange : function (newDate, oldDate) {
alert(newDate + '|' + oldDate);
},
});
});
</script>
方法列表
//返回属性对象
console.log($('#box').calendar('options'));
//调整日历大小
$('#box').calendar('resize');
//移动到指定日期
$('#box').calendar('moveTo', new Date(2015,1,1));
//可以使用$.fn.calendar.defaults 重写默认值对象。
以上就是Jquery Easyui日历组件Calender使用详解(23)。我需要你的时候,你不是不在,而是不在意;所以,你需要我的时候,我不是不想,而是不想理。更多关于Jquery Easyui日历组件Calender使用详解(23)请关注haodaima.com其它相关文章!