File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ export default {
71
71
d .getMinutes (),
72
72
)
73
73
74
+ const todayMonth = new Date (
75
+ this .utils .setDate (this .utils .getNewDateObject (), 1 ),
76
+ )
77
+
74
78
for (let i = 0 ; i < 12 ; i += 1 ) {
75
79
months .push ({
76
80
month: this .utils .getMonthName (i, this .translation .months ),
@@ -81,6 +85,7 @@ export default {
81
85
this .openDate &&
82
86
this .utils .compareDates (dObj, this .openDate ),
83
87
isSelected: this .isSelectedMonth (dObj),
88
+ isToday: this .utils .compareDates (dObj, todayMonth),
84
89
})
85
90
this .utils .setMonth (dObj, this .utils .getMonth (dObj) + 1 )
86
91
}
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ export default {
75
75
d .getHours (),
76
76
d .getMinutes (),
77
77
)
78
+ const todayYear = new Date (
79
+ this .utils .setDate (this .utils .getNewDateObject (), 1 ),
80
+ )
81
+
78
82
for (let i = 0 ; i < this .yearRange ; i += 1 ) {
79
83
years .push ({
80
84
year: this .utils .getFullYear (dObj),
@@ -85,6 +89,7 @@ export default {
85
89
this .openDate &&
86
90
this .utils .compareDates (dObj, this .openDate ),
87
91
isSelected: this .isSelectedYear (dObj),
92
+ isToday: this .utils .compareDates (dObj, todayYear),
88
93
})
89
94
this .utils .setFullYear (dObj, this .utils .getFullYear (dObj) + 1 )
90
95
}
You can’t perform that action at this time.
0 commit comments