选择日期后直接关闭控件

当选择type:"month",showBottom:false时,选择月份后直接选取日期,关闭日期控件优化
pull/62/head
yangyanbin 2017-09-13 10:57:00 +08:00 committed by GitHub
parent 286a40b202
commit deda1e402b
1 changed files with 5 additions and 1 deletions

View File

@ -1250,6 +1250,10 @@
that.setBtnStatus(); //同步按钮可点状态
options.range || that.done(null, 'change');
lay(that.footer).find(ELEM_TIME_BTN).removeClass(DISABLED);
if(!options.range&&options.type==="month"&&!options.showBottom&&lay(this.parentNode).hasClass("laydate-month-list")){
that.done();
that.setValue(that.parse()).remove();
}
});
} else {
var span = lay.elem('span', {
@ -1852,4 +1856,4 @@
}()
);
}();
}();