diff --git a/ayanova/src/components/dash-scheduser-next-wo.vue b/ayanova/src/components/dash-scheduser-next-wo.vue index e36f3fa8..194d99b6 100644 --- a/ayanova/src/components/dash-scheduser-next-wo.vue +++ b/ayanova/src/components/dash-scheduser-next-wo.vue @@ -10,37 +10,31 @@ v-on="$listeners" > @@ -65,7 +59,8 @@ export default { hour12: window.$gz.locale.getHour12(), formUserOptions: {}, startAt: "00:00", - intervalCount: 24 + intervalCount: 24, + now: null }; }, computed: {}, @@ -88,13 +83,27 @@ export default { if (!this.initialized) { await initialize(this); } - let hour = new Date().getHours() - 1; - if (hour < 0) { - hour = 0; - } - this.startAt = `${hour}:00`; - this.intervalCount = 24 - hour; + let now = new Date(); + + //set now for the calendar to trigger a refresh + this.now = now.toLocaleString("sv-SE", { + timeZone: this.timeZoneName + }); + + this.$refs.calendar.scrollToTime({ + hour: now.getHours(), + minute: 0 + }); + + // //calc where to scroll and set + // let hour = now.getHours() - 1; + // if (hour < 0) { + // hour = 0; + // } + + // this.startAt = `${hour}:00`; + // this.intervalCount = 24 - hour; try { this.errorMessage = null; const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);