File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
resources/js/packages/ui/src/FullCalendar Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 22import { computed , inject , type ComputedRef } from ' vue' ;
33import { formatDate , formatHumanReadableDuration } from ' ../utils/time' ;
44import type { Organization } from ' @/packages/api/src' ;
5+ import type { Dayjs } from ' dayjs' ;
56
67const props = defineProps <{
7- date: Date ;
8+ date: Dayjs ;
89 totalMinutes? : number ;
910}>();
1011
@@ -20,7 +21,7 @@ const dateFormat = computed(() => organization?.value?.date_format);
2021<template >
2122 <div class =" fc-day-header-custom" >
2223 <div class =" text-xs text-muted-foreground font-medium" >
23- {{ date.toLocaleDateString('en-US', { weekday: 'short' } ) }}
24+ {{ date.format('ddd' ) }}
2425 </div >
2526 <span >{{ formatDate(date.toISOString(), dateFormat) }}</span >
2627 <span class =" block text-xs text-muted-foreground font-medium mt-1" >
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ const calendarOptions = computed(() => ({
250250 editable: true ,
251251 eventResizableFromStart: true ,
252252 eventDurationEditable: true ,
253- timeZone: ' America/Adak ' ,
253+ timeZone: getUserTimezone () ,
254254 eventStartEditable: true ,
255255 select: handleDateSelect ,
256256 eventClick: handleEventClick ,
@@ -332,9 +332,16 @@ watch(showEditTimeEntryModal, (value) => {
332332 </template >
333333 <template #dayHeaderContent =" arg " >
334334 <FullCalendarDayHeader
335- :date =" arg.date"
335+ :date ="
336+ getDayJsInstance()(arg.date.toISOString()).utc().tz(getUserTimezone(), true)
337+ "
336338 :total-minutes ="
337- dailyTotals[getDayJsInstance()(arg.date).format('YYYY-MM-DD')] || 0
339+ dailyTotals[
340+ getDayJsInstance()(arg.date)
341+ .utc()
342+ .tz(getUserTimezone(), true)
343+ .format('YYYY-MM-DD')
344+ ] || 0
338345 " />
339346 </template >
340347 </FullCalendar >
You can’t perform that action at this time.
0 commit comments