Calendar

The calendar component is can be used to represent months, and is customisable through render callbacks for the header and cell elemtns

Mon

Tue

Wed

Thu

Fri

Sat

Sun

26
27
28
29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<Calendar
  date={new Date()}
  header={({ weekday }) => (
    <Box>
      <H2>{weekday}</H2>
    </Box>
  )}
  cell={({ today, date, outOfMonth }) => (
    <Box relative={true} jsStyle={{ opacity: outOfMonth ? 0.2 : 1 }}>
      {today && (
        <Badge
          jsStyle={{
            position: "absolute",
            top: "50%",
            transform: "translateY(-50%) translateX(-75%)",
            right: "50%",
          }}
        />
      )}
      <Span>{date.getDate()}</Span>
    </Box>
  )}
/>