Calendar

A calendar displays a grid of days in one or more months and allows users to select a single date.

Usage

October 2025

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
import { BsCalendar } from '@workspace/ui/components/Calendar'

export function CalendarDemo() {
    return <BsCalendar />
}

Examples

Default

October 2025

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
import { BsCalendar } from '@workspace/ui/components/Calendar'

export function CalendarDemo() {
    return <BsCalendar />
}

Controlled

October 2025

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
No value
'use client'

import { BsCalendar } from '@workspace/ui/components/Calendar'
import { useState } from 'react'

export function CalendarControlled() {
    const [value, setValue] = useState<string>()

    return (
        <div className="flex flex-col gap-2">
            <BsCalendar value={value} onChange={setValue} />
            <pre className="font-mono text-xs bg-background-secondary p-2 rounded-md border">
                {value ? JSON.stringify(value) : 'No value'}
            </pre>
        </div>
    )
}

Unstyled

October 2025

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
import { BsCalendar } from '@workspace/ui/components/Calendar'

export function CalendarUnstyled() {
    return <BsCalendar variant="unstyled" />
}

With Min/Max Date

October 2025

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
'use client'

import { BsCalendar } from '@workspace/ui/components/Calendar'
import dayjs from 'dayjs'

export function CalendarMinMax() {
    return (
        <BsCalendar minValue={dayjs().format('YYYY-MM-DD')} maxValue={dayjs().add(10, 'days').format('YYYY-MM-DD')} />
    )
}