Commit 44976d49 by 陈玉桐

修复 日期选择器endDate

parent c5e74f79
......@@ -2,13 +2,13 @@
"pages": [
"pages/index/index",
"pages/childInfo/childInfo",
"pages/eyesight/eyesight",
"pages/setting/setting",
"pages/historyDetail/historyDetail",
"pages/trainReport/trainReport",
"pages/starSort/starSort",
"pages/updatePlan/updatePlan",
"pages/trainSort/trainSort",
"pages/eyesight/eyesight",
"pages/setting/setting",
"pages/user/user",
"pages/plan/plan",
"pages/message/message",
......
......@@ -6,9 +6,14 @@ Page({
sex: '',// 性别
sexList: [{ id: 1, name: '男孩' }, { id: 2, name: '女孩' }],
isNull: false,
ednDate: ''
},
onLoad: function (options) {
let me = this;
let myDate = new Date()
me.setData({
ednDate: myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate()
})
// 请求前加Loading
wx.showLoading({
title: '加载中',
......
......@@ -22,7 +22,7 @@
<!-- 生日 -->
<view class="childInfoListItem">
<view class="childInfoListItemTitle"><text>* </text>生日</view>
<picker mode="date" value="{{date}}" start="1990-09-01" end="2025-01-01" bindchange="bindDateChange">
<picker mode="date" value="{{date}}" start="1990-09-01" end="{{ednDate}}" bindchange="bindDateChange">
<view class="birthdaypPicker rightInput">
{{date}}
</view>
......
......@@ -49,9 +49,15 @@ Page({
isClass: 0, //是否配镜
date: '2012-01-01',// 配镜日期
currentDate: ''
},
onLoad: function (options) {
let me = this;
let myDate = new Date()
me.setData({
currentDate: myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate()
})
},
eyesightBack: function() {
let me = this;
......
......@@ -90,7 +90,7 @@
</view>
<view class="eyesightConItem eyesightConItemLast">
<view class="eyesightConLeft eyesightConLeftTitle">· 配镜日期</view>
<picker mode="date" value="{{date}}" start="1990-09-01" end="2025-09-01" class="selectorPicker" bindchange="bindDateChange">
<picker mode="date" value="{{date}}" start="1990-09-01" end="{{currentDate}}" class="selectorPicker" bindchange="bindDateChange">
<view class="eyesightConRight">
{{date}}
</view>
......
......@@ -23,7 +23,7 @@
<view class="useSettingTipIcon">
<image src="../../assets/tips.png" />
<view class='invite' hidden="{{!constraintTipShow}}">
训练的使用时长达到设定时间后,系统将自动进行护眼训练
训练的使用时长达到设定时间后,系统将自动进行护眼训练
</view>
</view>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment