1.这个也是一个组件,不过在这个组件上做了一些处理,
日期选择
下面直接上码,有需求的可以直接现用,
index.js
Page({
/**
* 页面的初始数据
*/
data: {
activeType: "rounded",
year: new Date().getFullYear(),
month: new Date().getMonth() + 1,
day: new Date().getDate(),
dayStyle: [{
month: 'current',
day: new Date().getDate(),
color: 'white',
background: '#AAD4F5'
},
{
month: 'current',
day: new Date().getDate(),
color: 'white',
background: '#AAD4F5'
},
{
month: 'current',
day: new Date().getDate(),
color: 'white',
background: '#AAD4F5'
},
],