diff --git a/components/calendar/view/Row.vue b/components/calendar/view/Row.vue index a8515071..668e5a94 100644 --- a/components/calendar/view/Row.vue +++ b/components/calendar/view/Row.vue @@ -14,7 +14,14 @@ - + @@ -66,6 +73,14 @@ export default Vue.extend({ } return durationText; }, + rangeColor(): { 'is-primary': boolean, 'is-info': boolean } { + const now = Date.now(); + const isNow = this.marathonStart.getTime() <= now && now <= this.marathonEnd.getTime(); + return { + 'is-primary': isNow, + 'is-info': !isNow, + }; + }, todayStart(): Date { return new Date(this.datetime); }, @@ -92,7 +107,8 @@ export default Vue.extend({