Skip to content

Commit

Permalink
fix: Marker not positioned on correct dates when timezone is used (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Nov 10, 2023
1 parent cee65dc commit fa8029c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/VueDatePicker/components/DatePicker/date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ export const useDatePicker = (

// Check if the calendar day has a marker
const getMarker = (date: UnwrapRef<ICalendarDay>): IMarker | undefined =>
props.markers.find((marker) => isDateEqual(sanitizeDate(date.value), sanitizeDate(marker.date)));
props.markers.find((marker) =>
isDateEqual(sanitizeDate(date.value), getZonedDate(getDate(marker.date), props.timezone)),
);

const getSixWeeksMode = (firstWeekday: number, gapToEnd: number) => {
switch (props.sixWeeks === true ? 'append' : props.sixWeeks) {
Expand Down

0 comments on commit fa8029c

Please sign in to comment.