用 $.fn.calendar.defaults 重写了 defaults 。
用法 复制代码 代码如下: <div id="cc" style="width:180px;height:180px;"></div> 复制代码 代码如下: $(#cc).calendar({ width:600, height:600, current:new Date() });
特性
名称
类型
说明
默认值
width
number
日历组件的宽度 。
180
height
日历组件的高度 。
fit
boolean
true 时设置日历的尺寸以适应它的父容器 。
false
border
定义是否显示边框 。
true
weeks
array
显示星期的日历 。
[S,M,T,W,T,F,S]
months
显示月份的列表 。
[Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
year
日历的年 。
当前年份(4位)
month
日历的月 。
当前月份(从1开始)
current
Date
日历的日期 。
当前日期
事件
参数
onSelect
date
当用户选择一个日期时触发 。
方法
options
none
返回 options 对象 。
resize
调整日历的尺寸 。
moveTo
移动日历到一个指定的日期 。