@@ -263,6 +263,8 @@ export default {
263263          isSelected: this.isSelectedDate(dObj), 
264264          isDisabled: this.isDisabledDate(dObj), 
265265          isHighlighted: this.isHighlightedDate(dObj), 
266+           isHighlightStart: this.isHighlightStart(dObj), 
267+           isHighlightEnd: this.isHighlightEnd(dObj), 
266268          isToday: dObj.toDateString() === (new Date()).toDateString(), 
267269          isWeekend: dObj.getDay() === 0 || dObj.getDay() === 6, 
268270          isSaturday: dObj.getDay() === 6, 
@@ -620,6 +622,34 @@ export default {
620622      return highlighted 
621623    }, 
622624
625+     /** 
626+      * Whether a day is highlighted and it is the first date 
627+      * in the highlighted range of dates 
628+      * @param {Date} 
629+      * @return {Boolean} 
630+      */ 
631+     isHighlightStart (date) { 
632+       return this.isHighlightedDate(date) && 
633+         (this.highlighted.from instanceof Date) && 
634+         (this.highlighted.from.getFullYear() === date.getFullYear()) && 
635+         (this.highlighted.from.getMonth() === date.getMonth()) && 
636+         (this.highlighted.from.getDate() === date.getDate()) 
637+     }, 
638+ 
639+     /** 
640+      * Whether a day is highlighted and it is the first date 
641+      * in the highlighted range of dates 
642+      * @param {Date} 
643+      * @return {Boolean} 
644+      */ 
645+     isHighlightEnd (date) { 
646+       return this.isHighlightedDate(date) && 
647+         (this.highlighted.to instanceof Date) && 
648+         (this.highlighted.to.getFullYear() === date.getFullYear()) && 
649+         (this.highlighted.to.getMonth() === date.getMonth()) && 
650+         (this.highlighted.to.getDate() === date.getDate()) 
651+     }, 
652+ 
623653    /** 
624654     * Helper 
625655     * @param  {mixed}  prop 
@@ -754,7 +784,9 @@ export default {
754784        'today': day.isToday, 
755785        'weekend': day.isWeekend, 
756786        'sat': day.isSaturday, 
757-         'sun': day.isSunday 
787+         'sun': day.isSunday, 
788+         'highlight-start': day.isHighlightStart, 
789+         'highlight-end': day.isHighlightEnd 
758790      } 
759791    }, 
760792
0 commit comments