You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
801 B
43 lines
801 B
var dateTimePicker = require('../dateTimePicker.js') |
|
Page({ |
|
data: { |
|
dateTime:'', |
|
dateTimeArray:'', |
|
startT:'' |
|
}, |
|
|
|
onLoad: function (options) { |
|
|
|
var start = '2019-04-26 15:26' |
|
|
|
var obj = dateTimePicker.dateTimePicker(2015,2020,start); |
|
|
|
this.setData({ |
|
dateTime: obj.dateTime, |
|
dateTimeArray: obj.dateTimeArray |
|
}); |
|
|
|
var startT = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray,this.data.dateTime) |
|
console.log(startT); |
|
|
|
this.setData({ |
|
startT: startT |
|
}) |
|
|
|
}, |
|
//获取时间日期 |
|
changeDateTime(e) { |
|
|
|
this.setData({ |
|
dateTime: e.detail.value |
|
}) |
|
|
|
var startT = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray, this.data.dateTime) |
|
|
|
this.setData({ |
|
startT: startT |
|
}) |
|
}, |
|
|
|
}) |
|
|