微信小程序日歷組件calendar詳解及實(shí)例
更新時(shí)間:2017年06月08日 10:58:31 作者:Rolan
這篇文章主要介紹了微信小程序日歷組件calendar詳解及實(shí)例的相關(guān)資料,需要的朋友可以參考下
微信小程序日歷組件calendar詳解及實(shí)例
模版使用:
src="../cal/calendar.wxml"> is="calendar" data="{{selected_value,days,month,years,lunar_years,lunar_month,lunar_days,selectDateType,l unar_selected_value}}">
JS代碼使用:
var Calendar = require('../cal/calendar'); Page({ data: { selected_value: [], days: [], month: [], years: [], lunar_years: [], lunar_month: [], lunar_days: [], selectDateType: 1, lunar_selected_value: [] }, .... // 指定選擇器回調(diào)函數(shù) new Calendar('key', this, function(date){ that.setData({ date: date }) });
樣式
.calendar{ position: absolute; bottom: 0; width: 100%; z-index: 999; background-color: #fff; } .tab{ display:inline-block; width:50%; text-align:center; font-size:16px; color: #ccc; } .tab-bar{ background-color: #eee; height: 40px; line-height: 40px; } .tab-bar .active{ color: #000; } .selected-item{ font-size: 28px; } .event-type_parent{ font-size: 14px; } .event-type_child{ text-align: center; line-height: 30px; } .event-type_txt{ display: inline-block; }
以上用法看不懂的話,具體就參考代碼里面index目錄下。
感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!
相關(guān)文章
微信小程序獲取循環(huán)元素id以及wx.login登錄操作
這篇文章主要介紹了微信小程序獲取循環(huán)元素id以及wx.login登錄操作的相關(guān)資料,這里提供實(shí)例幫助大家實(shí)現(xiàn)該功能,需要的朋友可以參考下2017-08-08微信小程序 wxapp內(nèi)容組件 text詳細(xì)介紹
這篇文章主要介紹了微信小程序 wxapp內(nèi)容組件 text詳細(xì)介紹的相關(guān)資料,并附簡(jiǎn)單實(shí)例代碼,需要的朋友可以參考下2016-10-10微信小程序 頁(yè)面跳轉(zhuǎn)傳遞值幾種方法詳解
這篇文章主要介紹了微信小程序 頁(yè)面跳轉(zhuǎn)傳遞值幾種方法詳解的相關(guān)資料,需要的朋友可以參考下2017-01-01微信小程序之頁(yè)面跳轉(zhuǎn)和參數(shù)傳遞的實(shí)現(xiàn)
這篇文章主要介紹了微信小程序之頁(yè)面跳轉(zhuǎn)和參數(shù)傳遞的實(shí)現(xiàn)的相關(guān)資料,希望通過本文能幫助到大家,需要的朋友可以參考下2017-09-09JS版的date函數(shù)(和PHP的date函數(shù)一樣)
這篇文章主要介紹了JS版的date函數(shù),使用方法和PHP的date函數(shù)一樣,需要的朋友可以參考下2014-05-05