@@ -49,6 +49,7 @@ Page({
totle: 0,
//显示日历
+ todatDate:null,
minDate: null,
maxDate: null,
formatter(day) {
@@ -482,7 +483,8 @@ Page({
const endOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0).getTime();
this.setData({
minDate:startOfMonth,
- maxDate:endOfMonth
+ maxDate:endOfMonth,
+ todatDate:today.getTime()
})
}
@@ -123,7 +123,7 @@
<ec-canvas wx:if="{{day=='7'}}" id="mychart" canvas-id="mychart" ec="{{ec}}"></ec-canvas>
</view>
<view class="card4-bottom" wx:if="{{day=='30'}}">
- <van-calendar title='运动数据' poppable="{{ false }}" show-confirm="{{ false }}" min-date="{{ minDate }}" readonly="{{true}}" max-date="{{ maxDate }}" formatter="{{ formatter }}" color='#015EEA' />
+ <van-calendar title='运动数据' poppable="{{ false }}" show-confirm="{{ false }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" formatter="{{ formatter }}" color='#015EEA' default-date="{{todatDate}}" />