File tree 1 file changed +1
-6
lines changed
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 1
- import { TZDate } from "@date-fns/tz" ;
2
-
3
1
import { type DateLib } from "../classes/DateLib.js" ;
4
2
import { type DayPickerProps } from "../types/props.js" ;
5
3
@@ -25,8 +23,7 @@ export function getInitialMonth(
25
23
today = dateLib . today ( ) ,
26
24
numberOfMonths = 1 ,
27
25
endMonth,
28
- startMonth,
29
- timeZone
26
+ startMonth
30
27
} = props ;
31
28
let initialMonth = month || defaultMonth || today ;
32
29
const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib ;
@@ -40,8 +37,6 @@ export function getInitialMonth(
40
37
if ( startMonth && differenceInCalendarMonths ( initialMonth , startMonth ) < 0 ) {
41
38
initialMonth = startMonth ;
42
39
}
43
- // When timeZone is provided, convert initialMonth to TZDate type to ensure proper timezone handling
44
- initialMonth = timeZone ? new TZDate ( initialMonth , timeZone ) : initialMonth ;
45
40
46
41
return startOfMonth ( initialMonth ) ;
47
42
}
You can’t perform that action at this time.
0 commit comments