...
|
...
|
@@ -320,7 +320,10 @@ |
|
|
var month=date.getMonth()+1;
|
|
|
console.log(month);
|
|
|
var day=date.getDate();
|
|
|
console.log(day)
|
|
|
console.log(day);
|
|
|
var dayitem=year+"年"+month+"月"+day+"日";
|
|
|
var newday=''
|
|
|
|
|
|
//开始时间
|
|
|
$('.start').on('click', function () {
|
|
|
weui.datePicker({
|
...
|
...
|
@@ -329,7 +332,10 @@ |
|
|
defaultValue: [new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()],
|
|
|
onConfirm: function(result) {
|
|
|
// 二级调用:时间
|
|
|
newday=result[0].label+result[1].label+result[2].label;
|
|
|
show_expect_time_picker(result);
|
|
|
|
|
|
|
|
|
$('.weui-picker').on('animationend webkitAnimationEnd', function() {
|
|
|
show_expect_time_picker(result);
|
|
|
});
|
...
|
...
|
@@ -363,6 +369,7 @@ |
|
|
});
|
|
|
// 开始时间组件选择时分
|
|
|
function show_expect_time_picker(date) {
|
|
|
|
|
|
var hours = [],
|
|
|
minites = [],
|
|
|
symbol = [{
|
...
|
...
|
@@ -370,7 +377,12 @@ |
|
|
value: 0
|
|
|
}];
|
|
|
var d = new Date();
|
|
|
var my_hours = d.getHours();
|
|
|
if(newday==dayitem){
|
|
|
var my_hours = d.getHours();
|
|
|
}else{
|
|
|
var my_hours=0
|
|
|
}
|
|
|
|
|
|
var my_minutes = d.getMinutes();
|
|
|
var date = date[0].value + '年' + (date[1].value>9?date[1].value:('0'+date[1].value)) + '月' + (date[2].value>9?date[2].value:('0'+date[2].value)) + '日';
|
|
|
if (!hours.length) {
|
...
|
...
|
@@ -396,14 +408,14 @@ |
|
|
var expect_date = date + ' ' + time;
|
|
|
var timestamp = Date.parse(new Date());
|
|
|
var choosetamp = Date.parse(expect_date);
|
|
|
console.log(expect_date)
|
|
|
$('.start').html(expect_date);
|
|
|
// var attr = result[0]+'-'+result[1]+'-'+result[2];
|
|
|
// $(".start").attr('index',attr);
|
|
|
|
|
|
},
|
|
|
className: 'mytime'
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//结束时间选择时分
|
|
|
function show_expect_time_picker1(date) {
|
|
|
var hours = [],
|
...
|
...
|
|