Welcome

首页 / 脚本样式 / JavaScript / Jquery Easyui日历组件Calender使用详解(23)

本文实例为大家分享了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 重写默认值对象。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。