commit
bb6dcfb7d3
|
@ -1706,6 +1706,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
date = this.daylightSavingAdjust(new Date(year, month - 1, day));
|
date = this.daylightSavingAdjust(new Date(year, month - 1, day));
|
||||||
|
|
||||||
if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
|
if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
|
||||||
throw "Invalid date"; // E.g. 31/02/00
|
throw "Invalid date"; // E.g. 31/02/00
|
||||||
}
|
}
|
||||||
|
@ -2193,7 +2194,7 @@ export default {
|
||||||
this.focused = false;
|
this.focused = false;
|
||||||
this.input.value = this.formatValue(this.modelValue);
|
this.input.value = this.formatValue(this.modelValue);
|
||||||
},
|
},
|
||||||
onKeyDown() {
|
onKeyDown(event) {
|
||||||
if (event.keyCode === 40 && this.overlay) {
|
if (event.keyCode === 40 && this.overlay) {
|
||||||
this.trapFocus(event);
|
this.trapFocus(event);
|
||||||
}
|
}
|
||||||
|
@ -2290,21 +2291,26 @@ export default {
|
||||||
if (propValue && Array.isArray(propValue)) {
|
if (propValue && Array.isArray(propValue)) {
|
||||||
if (this.isRangeSelection()) {
|
if (this.isRangeSelection()) {
|
||||||
propValue = propValue[1] || propValue[0];
|
propValue = propValue[1] || propValue[0];
|
||||||
} else if (this.isMultipleSelection()) {
|
}
|
||||||
|
else if (this.isMultipleSelection()) {
|
||||||
propValue = propValue[propValue.length - 1];
|
propValue = propValue[propValue.length - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (propValue && typeof propValue !== 'string') {
|
if (propValue && typeof propValue !== 'string') {
|
||||||
return propValue;
|
return propValue;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
let today = new Date();
|
let today = new Date();
|
||||||
|
|
||||||
if (this.maxDate && this.maxDate < today) {
|
if (this.maxDate && this.maxDate < today) {
|
||||||
return this.maxDate;
|
return this.maxDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.minDate && this.minDate > today) {
|
if (this.minDate && this.minDate > today) {
|
||||||
return this.minDate;
|
return this.minDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
return today;
|
return today;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue