lunar-cale
v0.1.0
Published
touch control component can support the traditional Chinese calendar
Downloads
5
Readme
lunar-cale
a touch control component can support the traditional Chinese calendar
1. How to install
npm i lunar-cale --save
2. How to use
see /example/index.html
3. API
LunarCale : Object
可支持农历和公历的移动端触控日历控件
Kind: global class
- LunarCale : Object
- new LunarCale([setting])
- .el ⇒ HTMLElement
- .isVisible : Boolean
- .show() ⇒ Object
- .hide() ⇒ Object
new LunarCale([setting])
参数说明: mode - 初始模式; lang - 语言; startYear - 开始年份 yyyy; endYear - 结束年份 yyyy; initShownYMD - 初始选中的日期 yyyy-mm-dd; selectCallback - 选中新值时的回调函数 - 关闭面板时的回调函数
| Param | Type | Default | | --- | --- | --- | | [setting] | Object | {mode, lang, startYear, endYear, initShownYMD, selectCallback, closeCallback} |
lunarCale.el ⇒ HTMLElement
取得组件的DOM
Kind: instance property of LunarCale
lunarCale.isVisible : Boolean
判断控件当前是否可见
Kind: instance property of LunarCale
lunarCale.show() ⇒ Object
显示
Kind: instance method of LunarCale
Returns: Object - 当前控件
lunarCale.hide() ⇒ Object
隐藏
Kind: instance method of LunarCale
Returns: Object - 当前控件