'弹出','重置','现在' 如果当前时间 小于 最小限制时间,直接从最小限制时间开始展示
'弹出','重置','现在' 如果当前时间 小于 最小限制时间,直接从最小限制时间开始展示pull/69/head
parent
bfc0c1bf6d
commit
766157f4a9
|
@ -723,7 +723,7 @@
|
||||||
,that.position() //定位
|
,that.position() //定位
|
||||||
);
|
);
|
||||||
|
|
||||||
that.checkDate().calendar(); //初始校验
|
that.checkDate().calendar(null, true); //初始校验
|
||||||
that.changeEvent(); //日期切换
|
that.changeEvent(); //日期切换
|
||||||
|
|
||||||
Class.thisElemDate = that.elemID;
|
Class.thisElemDate = that.elemID;
|
||||||
|
@ -993,10 +993,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
//日历表
|
//日历表
|
||||||
Class.prototype.calendar = function(value){
|
Class.prototype.calendar = function(value, isShowEventInitCalen){
|
||||||
var that = this
|
var that = this
|
||||||
,options = that.config
|
,options = that.config
|
||||||
,dateTime = value || options.dateTime
|
,dateTime = value || (options.dateTime =
|
||||||
|
isShowEventInitCalen && that.newDate(options.dateTime).getTime() < that.newDate(options.min).getTime() ? //'弹出','重置','现在' 如果当前时间 小于 最小限制时间,直接从最小限制时间开始展示
|
||||||
|
lay.extend({}, options.min) : options.dateTime
|
||||||
|
)
|
||||||
,thisDate = new Date(), startWeek, prevMaxDate, thisMaxDate
|
,thisDate = new Date(), startWeek, prevMaxDate, thisMaxDate
|
||||||
,lang = that.lang()
|
,lang = that.lang()
|
||||||
|
|
||||||
|
@ -1486,7 +1489,7 @@
|
||||||
,YMD = td.attr('lay-ymd').split('-')
|
,YMD = td.attr('lay-ymd').split('-')
|
||||||
|
|
||||||
,setDateTime = function(one){
|
,setDateTime = function(one){
|
||||||
var thisDate = new Date();
|
// var thisDate = new Date(); //useless
|
||||||
|
|
||||||
//同步dateTime
|
//同步dateTime
|
||||||
one && lay.extend(dateTime, YMD);
|
one && lay.extend(dateTime, YMD);
|
||||||
|
@ -1596,7 +1599,7 @@
|
||||||
that.setValue('').remove();
|
that.setValue('').remove();
|
||||||
isStatic && (
|
isStatic && (
|
||||||
lay.extend(dateTime, that.firstDate)
|
lay.extend(dateTime, that.firstDate)
|
||||||
,that.calendar()
|
,that.calendar(null, true)
|
||||||
)
|
)
|
||||||
options.range && (
|
options.range && (
|
||||||
delete that.startState
|
delete that.startState
|
||||||
|
@ -1617,7 +1620,7 @@
|
||||||
,seconds: thisDate.getSeconds()
|
,seconds: thisDate.getSeconds()
|
||||||
});
|
});
|
||||||
that.setValue(that.parse()).remove();
|
that.setValue(that.parse()).remove();
|
||||||
isStatic && that.calendar();
|
isStatic && that.calendar(null, true);
|
||||||
that.done();
|
that.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue