微信小程序日历组件;提供平铺与滚动可折叠模式
微信小程序日历组件
1.使用
3.界面
平铺展示
<!--index.wxml--> <Calendar bind:select="select"></Calendar>
使用组件并为其绑定监听事件
//index.js select: function (e) { this.setData({ selectVal:e.detail }) }
在js文件中添加事件监听函数,获取选中的日期
2.配置属性参数 | 说明 | 类型 | 默认 |
---|---|---|---|
default-value="{{value}}" | 设置指定日期,如"2018-11-11" | string | 当前时间 |
week-text="{{week}}" | 星期标题 | array | ["周六",..."周日"] |
last-month="{{lastMonth}}" | 按钮,上个月 | string | "" |
next-month="{{nextMonth}}" | 按钮,下个月 | string | "" |
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。