...
|
...
|
@@ -162,17 +162,20 @@ |
|
|
|
|
|
var dt = new Date();
|
|
|
var df= [dt.getFullYear(), (dt.getMonth() + 1), dt.getDate()];
|
|
|
$('.birthday').on('focus',function() {
|
|
|
$('.birthday').on('focus',function(e) {
|
|
|
console.log(e)
|
|
|
var ele = e.currentTarget.id;
|
|
|
console.log(ele)
|
|
|
var obj = $(this);
|
|
|
var this_date = obj.val();
|
|
|
dt = new Date(Date.parse(this_date.replace('年','-').replace('月','-').replace('日','')))
|
|
|
df= [dt.getFullYear(), (dt.getMonth() + 1), dt.getDate()];
|
|
|
console.log(df);
|
|
|
timeInit(obj,df);
|
|
|
timeInit(obj,df,ele);
|
|
|
});
|
|
|
|
|
|
// 时间组件
|
|
|
function timeInit(obj,df) {
|
|
|
function timeInit(obj,df,el) {
|
|
|
weui.datePicker({
|
|
|
start: 2000,
|
|
|
end: 2030,
|
...
|
...
|
@@ -184,7 +187,8 @@ |
|
|
onConfirm: function(result) {
|
|
|
var birthday = result[0].label + result[1].label + result[2].label;
|
|
|
obj.val(birthday)
|
|
|
}
|
|
|
},
|
|
|
id: el
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|