Only show datetime tz toggle if offset is different
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
38a3ffc19f
commit
9583804890
|
@ -111,6 +111,7 @@
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { getTimezoneOffset } from "date-fns-tz";
|
||||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
@ -177,6 +178,8 @@ export default class EventFullDate extends Vue {
|
||||||
return (
|
return (
|
||||||
!!this.timezone &&
|
!!this.timezone &&
|
||||||
!!this.userActualTimezone &&
|
!!this.userActualTimezone &&
|
||||||
|
getTimezoneOffset(this.timezone) !==
|
||||||
|
getTimezoneOffset(this.userActualTimezone) &&
|
||||||
this.timezone !== this.userActualTimezone
|
this.timezone !== this.userActualTimezone
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue