Permalink
Browse files

fix: 日期点击前一个月后一个月当前时间;多次点击表盘不可用的问题

  • Loading branch information...
1 parent 052ffe3 commit eb19ba21dd2e868e35f761faffa15ddd64590b40 @whizbz11 whizbz11 committed Dec 8, 2016
Showing with 7 additions and 2 deletions.
  1. +7 −2 js/neoui-datetimepicker.js
@@ -401,8 +401,12 @@ DateTimePicker.fn._fillDate = function(type){
tempDate = this.pickerDate;
} else if (type === 'preivous') {
tempDate = udate.sub(this.startDate,'d', 1);
+ // 默认显示每个月的1号
+ tempDate = udate.getDateObj(tempDate.setDate(1));
} else {
tempDate = udate.add(this.endDate,'d', 1);
+ // 默认显示每个月的1号
+ tempDate = udate.getDateObj(tempDate.setDate(1));
}
this.startDate = this._getPickerStartDate(tempDate);
this.endDate = this._getPickerEndDate(tempDate);
@@ -529,8 +533,9 @@ DateTimePicker.fn._fillTime = function(type){
// this._timeMobileScroll()
// return;
// }
- if(this.timeOpen)return;
- this.timeOpen = true;
+ //去除判断防止再次点击时间时,面板弹不出来
+ // if(this.timeOpen)return;
+ // this.timeOpen = true;
var year,month,day,date,time,template,timePage,titleDiv,dateDiv,weekSpans,language,tempDate, i,cell,timetemplate;
var self = this;
type = type || 'current';

0 comments on commit eb19ba2

Please sign in to comment.