Commit 2616957c by 潘琦

签约页日期格式转换解决后台日期无法解析问题YYYY-mm-dd;

parent 9bce7d2c
......@@ -900,10 +900,14 @@ export default {
lastMensesTimePickerConfirm (date) {
const selectedDate = new Date(date)
let month = selectedDate.getMonth() + 1
if (selectedDate.getMonth() + 1 <= 9) {
month = '0' + (selectedDate.getMonth() + 1)
if (selectedDate.getMonth() + 1 < 10) {
month = '0' + month
}
this.BaseForm.lastMensesTime = selectedDate.getFullYear() + '-' + month + '-' + selectedDate.getDate()
let day = selectedDate.getDate()
if (day < 10) {
day = '0' + day
}
this.BaseForm.lastMensesTime = selectedDate.getFullYear() + '-' + month + '-' + day
},
openPickerBirth (index) { // 打开出生日期控件
this.pickerOpenIndex = index
......@@ -913,10 +917,14 @@ export default {
this.BaseValidate.birthKidState = true
const selectedDate = new Date(date)
let month = selectedDate.getMonth() + 1
if (selectedDate.getMonth() + 1 <= 9) {
month = '0' + (selectedDate.getMonth() + 1)
if (month < 10) {
month = '0' + month
}
let day = selectedDate.getDate()
if (day < 10) {
month = '0' + day
}
let birth = selectedDate.getFullYear() + '-' + month + '-' + selectedDate.getDate()
let birth = selectedDate.getFullYear() + '-' + month + '-' + day
this.childrenArr[this.pickerOpenIndex].birth = birth
this.childrenArr[this.pickerOpenIndex].age = getAgeByBirth(birth)
},
......
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