Calendar
Angular Bootstrap 5 Calendar plugin
MDB calendar is a plugin that allows you to efficiently manage tasks. Thanks to this extension you will be able to easily create new events, manage current events, move existing events between other days, and store all data in an easily readable array.
Responsive Calendar plugin built with the Bootstrap 5, Angular and Material Design. Various customization options like default view, event formats, customizable captions, and much more.Note: Read the API tab to find all available options and advanced customization
Basic example
A few predefined events allowing you to see how the plugin looks like.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 Angular Meetup | 3 | 4 | 5 JS Conference | 6 Vue Meetup Meeting | 7 Call | 8 |
9 Vue Meetup | 10 React Meetup | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Event formats
Calendar events can be added with time in two different formats - 12h or 24h.
Monday first
Set the mondayFirst
input to true so that Monday is the first day
of the week.
Mon | Tue | Wed | Thu | Fri | Sat | Sun |
---|---|---|---|---|---|---|
24 | 25 | 26 | 27 | 28 | 1 | 2 Angular Meetup |
3 Angular Meetup | 4 | 5 JS Conference | 6 Vue Meetup Meeting | 7 Call | 8 | 9 |
10 Vue Meetup React Meetup | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 1 | 2 | 3 | 4 | 5 | 6 |
Default view
Set the defaultView
input to week
or
list
to change the start view. By default, it is a month
.
Sun 02 | Mon 03 | Tue 04 | Wed 05 | Thu 06 | Fri 07 | Sat 08 | |
---|---|---|---|---|---|---|---|
Angular Meetup | JS Conference | Vue Meetup Meeting | Call | ||||
1:00 | |||||||
2:00 | |||||||
3:00 | |||||||
4:00 | |||||||
5:00 | |||||||
6:00 | |||||||
7:00 | |||||||
8:00 | Meeting | ||||||
9:00 | Meeting | ||||||
10:00 | Meeting | ||||||
11:00 | Meeting | Call | |||||
12:00 | Call | ||||||
13:00 | Call | ||||||
14:00 | |||||||
15:00 | |||||||
16:00 | |||||||
17:00 | |||||||
18:00 | |||||||
19:00 | |||||||
20:00 | |||||||
21:00 | |||||||
22:00 | |||||||
23:00 |
Twelve hour
By setting the twelveHours
input to true, you get a 12-hour
schedule.
Sun 02 | Mon 03 | Tue 04 | Wed 05 | Thu 06 | Fri 07 | Sat 08 | |
---|---|---|---|---|---|---|---|
Angular Meetup | JS Conference | Vue Meetup Meeting | Call | ||||
1:00 am | |||||||
2:00 am | |||||||
3:00 am | |||||||
4:00 am | |||||||
5:00 am | |||||||
6:00 am | |||||||
7:00 am | |||||||
8:00 am | Meeting | ||||||
9:00 am | Meeting | ||||||
10:00 am | Meeting | ||||||
11:00 am | Meeting | Call | |||||
12:00 pm | Call | ||||||
1:00 pm | Call | ||||||
2:00 pm | |||||||
3:00 pm | |||||||
4:00 pm | |||||||
5:00 pm | |||||||
6:00 pm | |||||||
7:00 pm | |||||||
8:00 pm | |||||||
9:00 pm | |||||||
10:00 pm | |||||||
11:00 pm |
Customize captions
You can customize all captions very easily using options input. Detailed options are described in the API tab.
Nd | Pon | Wt | Śr | Czw | Pt | Sb |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 Angular Meetup | 3 | 4 | 5 JS Conference | 6 Vue Meetup Meeting | 7 Call | 8 |
9 Vue Meetup | 10 React Meetup | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Default date
A starting day can be easily set using the
defaultDate
input.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
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 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
Readonly
The editable mode can be easily disabled using the
readonly
input.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 Angular Meetup | 3 | 4 | 5 JS Conference | 6 Vue Meetup Meeting | 7 Call | 8 |
9 Vue Meetup | 10 React Meetup | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Disabled modules
Some of the modules can be disabled via inputs. Here's an example without tooltips and some toolbar action elements:
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 Angular Meetup | 3 | 4 | 5 JS Conference | 6 Vue Meetup Meeting | 7 Call | 8 |
9 Vue Meetup | 10 React Meetup | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Blur
Past events can be blurred with the data-mdb-blur
attribute.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 Angular Meetup | 3 | 4 | 5 JS Conference | 6 Vue Meetup Meeting | 7 Call | 8 |
9 Vue Meetup | 10 React Meetup | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Calendar - API
Installation
To install and configure the plugin follow our Plugins Installation Guide. Please remember to update all the plugin names and import paths. You can find all the necessary information in the Import section.
Import
Inputs
Name | Type | Default | Description |
---|---|---|---|
mondayFirst
|
Boolean | false |
Changes first day of week to monday. |
defaultView
|
MdbCalendarView | 'month' |
Defines default view. |
twelveHour
|
Boolean | false |
Changes time mode from 24h to 12h. |
defaultDate
|
Date | new Date() |
Defines the default starting date. |
readonly
|
Boolean | false |
Disables event's edition. |
events
|
MdbCalendarEvent[] | - |
Array of calendar events |
tooltips
|
Boolean | true |
Enables tooltips. |
navigation
|
Boolean | true |
Enables navigation. |
viewSelect
|
Boolean | true |
Enables viewSelect. |
addEventButton
|
Boolean | true |
Enables addEventButton. |
Outputs
Name | Type | Description |
---|---|---|
prev
|
EventEmitter<any> | Emitted when the prev method triggers. |
next
|
EventEmitter<any> | Emitted when the next method triggers. |
today
|
EventEmitter<any> | Emitted when the today method triggers. |
viewChanged
|
EventEmitter<MdbCalendarView> | Emitted when the changeView method triggers. |
eventAdded
|
EventEmitter<MdbCalendarEvent> | Emitted when a new event is added. Returns a new event object. |
eventEdited
|
EventEmitter<MdbCalendarEvent> | Emitted when any event is editted. Returns an editted event object. |
eventDeleted
|
EventEmitter<MdbCalendarEvent> | Emitted when any event is deleted. Returns a deleted event object. |
Methods
Name | Description | Example |
---|---|---|
prevPeriod |
Changes the period of time to previous. | calendar.prevPeriod() |
nextPeriod |
Changes the period of time to next. | calendar.nextPeriod() |
todayPeriod |
Changes the period of time to today. | calendar.todayPeriod() |
changeView(view: MdbCalendarView)
|
Changes the view. You can choose between 'list' , 'month' or 'week' |
calendar.changeView('list') |
addEvent(event:MdbCalendarEvent)
|
Adds new event to the calendar. | calendar.addEvent(event) |
removeEvents
|
Removes all events from the calendar. | calendar.removeEvents() |
Advanced types
MdbCalendarOptions
Name | Type | Default | Description |
---|---|---|---|
weekdays
|
Array | ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] |
Defines weekdays displayed names. |
months
|
Array | ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] |
Defines months displayed names. |
monthsShort
|
Array | ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] |
Defines shortened months displayed names. |
todayCaption
|
String | 'today' |
Defines caption for today. |
monthCaption
|
String | 'month' |
Defines caption for month button. |
weekCaption
|
String | 'week' |
Defines caption for week button. |
listCaption
|
String | 'list' |
Defines caption for list button. |
allDayCaption
|
String | 'All day event' |
Defines caption for all day event checkbox. |
noEventsCaption
|
String | 'No events' |
Defines caption for empty list view. |
summaryCaption
|
String | 'Summary' |
Defines caption for summary input label. |
descriptionCaption
|
String | 'Description' |
Defines caption for description input label. |
startCaption
|
String | 'Start' |
Defines caption for start input label. |
endCaption
|
String | 'End' |
Defines caption for end input label. |
addCaption
|
String | 'Add' |
Defines caption for add event button. |
deleteCaption
|
String | 'Remove' |
Defines caption for remove event button. |
editCaption
|
String | 'Edit' |
Defines caption for edit event button. |
closeCaption
|
String | 'Close' |
Defines caption for close button. |
addEventModalCaption
|
String | 'Add an event' |
Defines caption for add event modal title. |
editEventModalCaption
|
String | 'Edit an event' |
Defines caption for edit event modal title. |
addEventButtonCaption
|
String | 'Add event' |
Defines caption for add event button. |