Skip to content

Commit fc6c4f9

Browse files
committed
Fixed problem connected with day hover
1 parent 2091f1a commit fc6c4f9

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"name": "vue-functional-calendar",
88
"description": "Lightweight, high-performance calendar component based on Vue.js",
9-
"version": "2.5.9",
9+
"version": "2.6.0",
1010
"license": "MIT",
1111
"repository": {
1212
"type": "git",

src/assets/scss/calendar.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ input.vfc-single-input {
534534
align-items: center;
535535
}
536536

537-
&.vfc-hover:hover {
537+
&.vfc-hover:hover, &.vfc-hovered {
538538
background-color: $lightgreyHover;
539539
z-index: 100;
540540
}
@@ -696,7 +696,8 @@ input.vfc-single-input {
696696
color: $black;
697697
}
698698

699-
&.vfc-hover:hover {
699+
&.vfc-hover:hover, &.vfc-hovered {
700+
z-index: 1;
700701
background-color: rgba(76, 76, 76, 0.3);
701702
}
702703
}
@@ -708,6 +709,7 @@ input.vfc-single-input {
708709
}
709710
}
710711

712+
711713
.vfc-months-container {
712714
.vfc-navigation-buttons {
713715
.vfc-top-date {

src/components/FunctionalCalendar.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@
426426
hide: day.hide,
427427
isMouseToLeft: false,
428428
isMouseToRight: false,
429+
isHovered: false,
429430
isDateRangeStart: vm.checkDateRangeStart(helpCalendar.formatDate(date)),
430431
isDateRangeEnd: vm.checkDateRangeEnd(helpCalendar.formatDate(date)),
431432
hideLeftAndRightDays: day.hideLeftAndRightDays,
@@ -624,6 +625,8 @@
624625
625626
let item = week.days[i];
626627
628+
this.listCalendars[e].weeks[f].days[i].isHovered = false;
629+
627630
if (item.date !== this.calendar.dateRange.start.date && !this.fConfigs.markedDates.includes(item.date)) {
628631
this.listCalendars[e].weeks[f].days[i].isMarked = false;
629632
}
@@ -649,6 +652,10 @@
649652
) {
650653
this.listCalendars[e].weeks[f].days[i].isMarked = true;
651654
}
655+
656+
if(!this.calendar.dateRange.end.date && itemDate === thisDate){
657+
this.listCalendars[e].weeks[f].days[i].isHovered = true;
658+
}
652659
}
653660
654661
}
@@ -805,6 +812,8 @@
805812
// Mark Date
806813
if (day.isMarked) {
807814
classes.push('vfc-marked');
815+
}else if(day.isHovered) {
816+
classes.push('vfc-hovered');
808817
}
809818
810819
if (this.fConfigs.markedDates.includes(day.date)) {

0 commit comments

Comments
 (0)