Skip to content

Commit

Permalink
Show only 1 year at once in the calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
majakomel committed Jun 18, 2024
1 parent e7f6349 commit eac7986
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/as/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const Calendar = React.memo(function Calendar({data}) {
<StyledCalendar>
<ResponsiveCalendar
data={calendarData}
from={`${selectedYear}-01-01`}
// setting from field to Jan 2nd is a weird fix in order
// for the calendar to appear correctly as a single year
from={`${selectedYear}-01-02`}
to={`${selectedYear}-12-31`}
emptyColor={colors.gray1}
colorScale={(value) => findColor(value)}
Expand Down

0 comments on commit eac7986

Please sign in to comment.