We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c2f0bf commit a074a71Copy full SHA for a074a71
src/layouts/calendar/utils.ts
@@ -63,10 +63,12 @@ export function getHijriEvents(
63
64
export function getGregorianEvents(
65
events: FetchedAllEvents,
66
- selectedDate: jalaliMoment.Moment, // Hijri date
+ date: jalaliMoment.Moment,
67
): FetchedEvent[] {
68
- const gregorianDay = selectedDate.format('D')
69
- const gregorianMonth = selectedDate.format('M')
+ const gregorianDate = date.clone().locale('en').utc().add(3.5, 'hours')
+
70
+ const gregorianDay = gregorianDate.format('D')
71
+ const gregorianMonth = gregorianDate.format('M')
72
return events.gregorianEvents.filter(
73
(event) => event.month === +gregorianMonth && event.day === +gregorianDay,
74
)
0 commit comments