Skip to content

Commit 144c79f

Browse files
add timezone to event details popup
1 parent c997bd0 commit 144c79f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/App.jsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import FullCalendar from '@fullcalendar/react';
55
import rrulePlugin from '@fullcalendar/rrule';
66
import timeGridPlugin from '@fullcalendar/timegrid';
77

8-
import { mdiCalendarRange, mdiClose, mdiMapMarkerOutline } from '@mdi/js';
8+
import { mdiCalendarRange, mdiClose, mdiMapMarkerOutline, mdiClock } from '@mdi/js';
99
import Icon from '@mdi/react';
1010
import parse from 'html-react-parser';
1111
import { createRef, useCallback, useEffect, useMemo, useState } from 'react';
@@ -136,6 +136,7 @@ function App() {
136136
const toDate = printDate(eventDetails.end);
137137
const fromTime = printTime(eventDetails.start);
138138
const toTime = printTime(eventDetails.end);
139+
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
139140
let eventTime = '';
140141
if (fromDate == toDate) {
141142
eventTime = fromDate + ' ' + fromTime + ' - ' + toTime;
@@ -213,6 +214,12 @@ function App() {
213214
</div>
214215
<div>{eventTime}</div>
215216
</div>
217+
<div className="event-timeZone">
218+
<div className="icon">
219+
<Icon path={mdiClock} size={0.75} />
220+
</div>
221+
<div>Time Zone: {timeZone}</div>
222+
</div>
216223
{eventLocation && (
217224
<div className="event-location">
218225
<div className="icon">

0 commit comments

Comments
 (0)