Skip to content

Commit d7a57b7

Browse files
committed
Restore original getInitialMonth
Signed-off-by: gpbl <[email protected]>
1 parent dac3509 commit d7a57b7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/helpers/getInitialMonth.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { TZDate } from "@date-fns/tz";
2-
31
import { type DateLib } from "../classes/DateLib.js";
42
import { type DayPickerProps } from "../types/props.js";
53

@@ -25,8 +23,7 @@ export function getInitialMonth(
2523
today = dateLib.today(),
2624
numberOfMonths = 1,
2725
endMonth,
28-
startMonth,
29-
timeZone
26+
startMonth
3027
} = props;
3128
let initialMonth = month || defaultMonth || today;
3229
const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;
@@ -40,8 +37,6 @@ export function getInitialMonth(
4037
if (startMonth && differenceInCalendarMonths(initialMonth, startMonth) < 0) {
4138
initialMonth = startMonth;
4239
}
43-
// When timeZone is provided, convert initialMonth to TZDate type to ensure proper timezone handling
44-
initialMonth = timeZone ? new TZDate(initialMonth, timeZone) : initialMonth;
4540

4641
return startOfMonth(initialMonth);
4742
}

0 commit comments

Comments
 (0)