AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > JavaScript

Jquery Easyui日历组件Calender使用详解(23)

51自学网 http://www.wanshiok.com
Jquery,Easyui,日历组件,Calender

本文实例为大家分享了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 重写默认值对象。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持wanshiok.com。


Jquery,Easyui,日历组件,Calender  
上一篇:前端js弹出框组件使用方法  下一篇:Jquery Easyui自定义下拉框组件使用详解(21)