mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-23 15:20:36 +03:00
fix: get-class should be valid in range
This commit is contained in:
@@ -89,16 +89,17 @@ export default {
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
getRangeClasses(cellDate, currentDates, classes) {
|
getRangeClasses(cellDate, currentDates, classnames) {
|
||||||
|
const classes = [].concat(this.getClasses(cellDate, currentDates, classnames));
|
||||||
if (
|
if (
|
||||||
!/disabled|active|not-current-month/.test(classes) &&
|
!/disabled|active|not-current-month/.test(classnames) &&
|
||||||
currentDates.length === 2 &&
|
currentDates.length === 2 &&
|
||||||
cellDate.getTime() > currentDates[0].getTime() &&
|
cellDate.getTime() > currentDates[0].getTime() &&
|
||||||
cellDate.getTime() < currentDates[1].getTime()
|
cellDate.getTime() < currentDates[1].getTime()
|
||||||
) {
|
) {
|
||||||
return 'in-range';
|
classes.push('in-range');
|
||||||
}
|
}
|
||||||
return '';
|
return classes;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
Reference in New Issue
Block a user