微信小程序日歷組件calendar詳解及實例
更新時間:2017年06月08日 10:58:31 作者:Rolan
這篇文章主要介紹了微信小程序日歷組件calendar詳解及實例的相關(guān)資料,需要的朋友可以參考下
微信小程序日歷組件calendar詳解及實例

模版使用:
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目錄下。
感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
相關(guān)文章
微信小程序 swiper制作tab切換實現(xiàn)附源碼
這篇文章主要介紹了微信小程序 swiper制作tab切換實現(xiàn)代碼的相關(guān)資料,需要的朋友可以參考下2017-01-01
jQuery單頁面文字搜索插件jquery.fullsearch.js的使用方法
jquery.fullsearch.js是一款基于Bootstrap文字搜索插件,可以幫助您快速搜索到當(dāng)前頁面所包含的指定文字,并定位到所在位置2020-02-02
JavaScript中isPrototypeOf函數(shù)
這篇文章主要介紹了JavaScript中isPrototypeOf函數(shù),isPrototypeOf() 是 Object函數(shù)(類)的下的一個方法,用于判斷當(dāng)前對象是否為另外一個對象的原型,如果是就返回 true,否則就返回 false,下面來看看詳細內(nèi)容,需要的朋友可以參考一下2021-11-11
'2'>'10'==true?解析JS如何進行隱式類型轉(zhuǎn)換
這篇文章主要為大家介紹了'2'>'10'==true?解析JS如何進行隱式類型轉(zhuǎn)換示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2023-09-09

