Calendar View

Month/week/day calendar view with event slots.

python 8 params

Preview

January 2026
Mon
Tue
Wed
Thu
Fri
Sat
Sun
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

Usage

views.py
python
from djust import LiveView
from djust.components import CalendarView


class MyView(LiveView):
    template_name = "my_template.html"

    def mount(self, request, **kwargs):
        self.component = CalendarView()
my_template.html
django
{{ component }}

Parameters

NameTypeDefaultDescription
eventslist | NoneNoneList of dicts with ``date`` (YYYY-MM-DD), ``title``, optional ``color``
monthint1Month number (1-12)
yearint2026Four-digit year
viewstr'month'"month", "week", or "day" (default: "month")
start_dayint0First day of week, 0=Mon 6=Sun (default: 0)
eventstr — renames the event; identity is `name`''djust click event for day cells
custom_classstr''Additional CSS classes
**kwargs— passed to `Component.__init__`: `name=` identifies the instance in the events it sends, `id=` sets `component.id`, and any other keyword is kept as state——
Source & styles
FilePathNotes
moduledjust.components.components.calendar_viewSubclass it, or pass custom_class, to change how it renders.
cssdjust_components/components.cssDefines 10 of this component's classes at line 2211, 2212, 2213, 2214, 2215, 2216, 2218, 2219, 2526, 2527. Override those rules, or the custom properties they read, in a stylesheet loaded after it.