Permalink
Browse files

fix: 日期组件点击确定的时候控制时间范围

  • Loading branch information...
liuyk
liuyk committed Dec 6, 2016
1 parent 518d0cc commit 9769c225fb38023981343a1692e3cb0acb22e947
Showing with 12 additions and 1 deletion.
  1. +12 −1 js/neoui-datetimepicker.js
View
@@ -1308,7 +1308,18 @@ DateTimePicker.fn.onOk = function(){
return;
}
}
this.setDate(this.pickerDate);
var flag = true;
if (this.beginDateObj) {
if (this.beginDateObj < this.startDate)
flag = false;
}
if (this.overDateObj) {
if (this.overDateObj > this.endDate)
flag = false;
}
if(flag){
this.setDate(this.pickerDate);
}
this.isShow = false;
this.timeOpen = false;
removeClass(this._panel, 'is-visible');

0 comments on commit 9769c22

Please sign in to comment.