You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`headerBackgroundColor`| string |`null`| Custom header background color |
120
121
|`bodyBackgroundColor`| string |`null`| Custom body background color |
121
122
|`showTimeInEvent`| boolean |`true`| Display time in events |
@@ -148,6 +149,51 @@ const calendar = new SimpleCalendar(calendarElement, {
148
149
}
149
150
```
150
151
152
+
## Month View Types
153
+
154
+
SimpleCalendarJs supports two distinct month view modes:
155
+
156
+
### MultiDay Mode (Default)
157
+
Shows events as text overlays on calendar days. This is the traditional calendar view where event titles are displayed within the day cells.
158
+
159
+
```javascript
160
+
constcalendar=newSimpleCalendar('#calendar', {
161
+
calendarMonthViewType:'MultiDay', // Default
162
+
data: [
163
+
{
164
+
start:'2024-11-15',
165
+
end:'2024-11-17',
166
+
title:'Conference',
167
+
backgroundColor:'#007bff'
168
+
}
169
+
]
170
+
});
171
+
```
172
+
173
+
### SingleDay Mode
174
+
Shows event presence through background colors only. Day numbers are centered and no event text is displayed. This provides a clean, minimalist view that highlights which days have events.
175
+
176
+
```javascript
177
+
constcalendar=newSimpleCalendar('#calendar', {
178
+
calendarMonthViewType:'SingleDay',
179
+
data: [
180
+
{
181
+
start:'2024-11-15',
182
+
end:'2024-11-17',
183
+
title:'Conference', // Title not displayed in SingleDay mode
184
+
backgroundColor:'#e0e0e0'// Custom color or defaults to gray variations
185
+
}
186
+
]
187
+
});
188
+
```
189
+
190
+
**SingleDay Mode Features:**
191
+
- Day numbers are centered in the cell
192
+
- Event backgrounds use subtle gray variations by default
193
+
- No event text is displayed for a clean appearance
194
+
- Custom `backgroundColor` values in events are respected
195
+
- Ideal for overview calendars or when space is limited
0 commit comments