Skip to content

Commit

Permalink
Merge pull request #235 from suvarnakale/shiksha-2.0
Browse files Browse the repository at this point in the history
Issue #000 bug: last 30 days on dashboard- fixed
  • Loading branch information
itsvick authored Jun 5, 2024
2 parents 8a7b385 + 26dc732 commit 657dc77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/WeekCalender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const Calendar: React.FC<any> = ({
const days = [];
// const startDate = startOfWeek(currentMonth, { weekStartsOn: 1 });
const today = new Date();
const startDate = subDays(today, 7);
const startDate = subDays(today, dashboardDaysLimit - 1);
const endDate = subDays(today, 0);

for (let i = 0; i < dashboardDaysLimit; i++) {
Expand All @@ -82,7 +82,7 @@ const Calendar: React.FC<any> = ({
const renderCells = () => {
const today = new Date();
const endDate = subDays(today, 0);
const startDate = subDays(endDate, 7);
const startDate = subDays(endDate, dashboardDaysLimit - 1);
const dateFormat = 'd';
const rows = [];
let days = [];
Expand Down

0 comments on commit 657dc77

Please sign in to comment.