Start a week from monday instead of sunday
This commit is contained in:
@@ -33,8 +33,8 @@ const GanttChart = ({
|
|||||||
}: GanttChartProps) => {
|
}: GanttChartProps) => {
|
||||||
const startDate = new Date(startDateString)
|
const startDate = new Date(startDateString)
|
||||||
const endDate = new Date(endDateString)
|
const endDate = new Date(endDateString)
|
||||||
const firstDateToRender = subDays(startDate, startDate.getDay())
|
const firstDateToRender = subDays(startDate, startDate.getDay() - 1)
|
||||||
const lastDateToRender = addDays(endDate, 6 - endDate.getDay())
|
const lastDateToRender = addDays(endDate, 6 - endDate.getDay() + 1)
|
||||||
const todayDate = new Date(todayDateString)
|
const todayDate = new Date(todayDateString)
|
||||||
|
|
||||||
const daysToRender = differenceInCalendarDays(
|
const daysToRender = differenceInCalendarDays(
|
||||||
|
|||||||
Reference in New Issue
Block a user