Day Marks, Colors & Labels
You can highlight days, mark them with colored dots, add labels or completely color the background of the days using the marked, colors and labels options. This offers means to add more information to the calendar that could be valuable to users. While you can use the colors along with marked and labels, the latter two are mutually exclusive because they get rendered in the same place on the UI.
You can add them as exact dates, ranges or specify recurring rules. The recurring object supports different ways to describe the rules.
The passed date-times can also contain timezone data which requires a timezonePlugin to be interpreted correctly. Check out how timezones work in the range.
Use the onPageLoading lifecycle event to load the data runtime. You can learn about lifecycle events and places where to drop logic to customize the experience.
Demo
<Datepicker
colors={[
{
date: new Date(year, month, 2),
background: '#f3ac5d'
}, {
date: new Date(year, month, 3),
background: '#49b9b0'
}, {
date: new Date(year, month, 6),
highlight: '#f3a146'
}, {
date: new Date(year, month, 11),
background: '#e274d0'
}, {
date: new Date(year, month, 15),
highlight: '#b4c145'
}, {
date: new Date(year, month, 19),
background: '#8dec7d'
}, {
date: new Date(year, month, 23),
highlight: '#ff6a00'
}, {
date: new Date(year, month, 11),
background: '#ea4986',
highlight: '#c7356d'
}, {
recurring: {
repeat: 'yearly', month: 5, day: 1
},
background: '#f57777'
}
]}
marked={[
{
date: new Date(year, month, 2),
color: '#46c4f3'
}, {
date: new Date(year, month, 10),
color: '#7e56bd'
}, {
date: new Date(year, month, 13),
color: '#f13f77'
}, {
date: new Date(year, month, 13),
color: '#89d7c9'
}, {
date: new Date(year, month, 21),
color: '#ffc400'
}, {
date: new Date(year, month, 21),
color: '#8dec7d'
},{
recurring: {
repeat: 'yearly', month: 4, day: 1
},
color: 'ffc400'
}
]}
labels={[
{
date: new Date(year, month, 2),
textColor: '#46c4f3',
text: 'Ana BD'
}, {
date: new Date(year, month, 3),
textColor: '#7e56bd',
text: 'Concert'
}, {
date: new Date(year, month, 8),
color: '#52a064',
text: 'Trip'
}, {
date: new Date(year, month, 16),
color: '#8dec7d',
text: 'Math exam'
}, {
date: new Date(year, month, 24),
color: '#f8b042',
text: 'Party'
},{
recurring: {
repeat: 'yearly', month: 5, day: 1
},
color: 'red',
title: 'Christmas'
}
]}
/>
import { Datepicker, Page, setOptions } from '@mobiscroll/react';
import { useMemo } from 'react';
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
function App() {
const myMarked = useMemo(
() => [
{ recurring: { repeat: 'yearly', month: 5, day: 1 }, color: '#ffc400' },
{ recurring: { repeat: 'yearly', month: 12, day: 24 }, color: '#ffee00' },
{ recurring: { repeat: 'yearly', month: 12, day: 25 }, color: 'red' },
{ date: '2026-11-04T00:00' },
{ date: '2026-08-13T00:00' },
{ date: '2026-10-02T00:00', color: '#46c4f3' },
{ date: '2026-10-06T00:00', color: '#7e56bd' },
{ date: '2026-10-11T00:00', color: '#7e56bd' },
{ date: '2026-10-19T00:00', color: '#89d7c9' },
{ date: '2026-10-28T00:00', color: '#ea4986' },
{ date: '2026-10-13T00:00', color: '#7e56bd' },
{ date: '2026-10-13T00:00', color: '#f13f77' },
{ date: '2026-10-13T00:00', color: '#89d7c9' },
{ date: '2026-10-13T00:00', color: '#8dec7d' },
{ date: '2026-10-21T00:00', color: '#ffc400' },
{ date: '2026-10-21T00:00', color: '#8dec7d' },
{ start: '2026-11-15T00:00', end: '2026-11-18T00:00', color: '#f4511e' },
],
[],
);
const myColors = useMemo(
() => [
{ recurring: { repeat: 'yearly', month: 12, day: 8 }, background: '#9ccc65' },
{ recurring: { repeat: 'yearly', month: 5, day: 1 }, background: 'red' },
{ recurring: { repeat: 'yearly', month: 12, day: 24 }, background: '#fff568' },
{ recurring: { repeat: 'yearly', month: 12, day: 25 }, background: '#e88080' },
{ date: '2026-11-04T00:00', background: '#cfd8dc' },
{ date: '2026-12-24T00:00', background: '#9575cd' },
{ date: '2026-08-13T00:00', background: '#d4e157' },
{ date: '2026-09-06T00:00', background: '#f4511e' },
{ date: '2026-11-06T00:00', background: '#46c4f3' },
{ date: '2026-11-22T00:00', background: '#7e56bd' },
{ date: '2026-09-11T00:00', background: '#46c4f3' },
{ date: '2026-09-29T00:00', background: '#7e56bd' },
{ date: '2026-10-02T00:00', background: '#46c4f3' },
{ date: '2026-10-03T00:00', background: '#7e56bd' },
{ date: '2026-10-11T00:00', background: '#f13f77' },
{ date: '2026-10-19T00:00', background: '#8dec7d' },
{ date: '2026-10-28T00:00', background: '#ea4986' },
{ start: '2026-11-15T00:00', end: '2026-11-18T00:00', text: 'Conference', background: '#f4511e' },
],
[],
);
const myLabels = useMemo(
() => [
{ recurring: { repeat: 'yearly', month: 12, day: 25 }, title: 'Christmas', color: '#f48fb1' },
{ recurring: { repeat: 'yearly', month: 1, day: 1 }, title: 'New year' },
{ recurring: { repeat: 'yearly', month: 12, day: 1 }, title: 'Meeting', color: '#ffc400' },
{ date: '2026-11-04T00:00', text: 'Spa day', color: '#cfd8dc' },
{ date: '2026-12-24T00:00', text: 'BD Party', color: '#9ccc65' },
{ date: '2026-08-13T00:00', text: 'Exams', color: '#d4e157' },
{ date: '2026-09-06T00:00', text: 'Trip', color: '#f4511e' },
{ date: '2026-11-06T00:00', color: '#46c4f3', text: 'Pizza Night' },
{ date: '2026-11-22T00:00', color: '#7e56bd', text: 'Beerpong' },
{ date: '2026-09-11T00:00', color: '#46c4f3', text: 'Anniversary' },
{ date: '2026-09-29T00:00', color: '#7e56bd', text: 'Pete BD' },
{ date: '2026-10-02T00:00', color: '#46c4f3', text: 'Ana BD' },
{ date: '2026-10-03T00:00', color: '#7e56bd', text: 'Concert' },
{ date: '2026-10-11T00:00', color: '#f13f77', text: 'Trip' },
{ date: '2026-10-19T00:00', color: '#8dec7d', text: 'Math exam' },
{ date: '2026-10-28T00:00', color: '#ea4986', text: 'Party' },
{ start: '2026-11-15T00:00', end: '2026-11-18T00:00', text: 'Conference', color: '#f4511e' },
],
[],
);
return (
<Page>
<div className="mbsc-grid">
<div className="mbsc-row">
<div className="mbsc-col-sm-12 mbsc-col-md-4">
<div className="mbsc-form-group">
<div className="mbsc-form-group-title">Marked days</div>
<Datepicker select="range" showRangeLabels={false} display="inline" marked={myMarked} />
</div>
</div>
<div className="mbsc-col-sm-12 mbsc-col-md-4">
<div className="mbsc-form-group">
<div className="mbsc-form-group-title">Colored days</div>
<Datepicker select="range" showRangeLabels={false} display="inline" colors={myColors} />
</div>
</div>
<div className="mbsc-col-sm-12 mbsc-col-md-4">
<div className="mbsc-form-group">
<div className="mbsc-form-group-title">Labels</div>
<Datepicker select="range" showRangeLabels={false} display="inline" labels={myLabels} />
</div>
</div>
</div>
</div>
</Page>
);
}
export default App;
import {
Datepicker,
MbscCalendarColor,
MbscCalendarLabel,
MbscCalendarMarked,
Page,
setOptions ,
} from '@mobiscroll/react';
import { FC, useMemo } from 'react';
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
const App: FC = () => {
const myMarked = useMemo<MbscCalendarMarked[]>(
() => [
{ recurring: { repeat: 'yearly', month: 5, day: 1 }, color: '#ffc400' },
{ recurring: { repeat: 'yearly', month: 12, day: 24 }, color: '#ffee00' },
{ recurring: { repeat: 'yearly', month: 12, day: 25 }, color: 'red' },
{ date: '2026-11-04T00:00' },
{ date: '2026-08-13T00:00' },
{ date: '2026-10-02T00:00', color: '#46c4f3' },
{ date: '2026-10-06T00:00', color: '#7e56bd' },
{ date: '2026-10-11T00:00', color: '#7e56bd' },
{ date: '2026-10-19T00:00', color: '#89d7c9' },
{ date: '2026-10-28T00:00', color: '#ea4986' },
{ date: '2026-10-13T00:00', color: '#7e56bd' },
{ date: '2026-10-13T00:00', color: '#f13f77' },
{ date: '2026-10-13T00:00', color: '#89d7c9' },
{ date: '2026-10-13T00:00', color: '#8dec7d' },
{ date: '2026-10-21T00:00', color: '#ffc400' },
{ date: '2026-10-21T00:00', color: '#8dec7d' },
{ start: '2026-11-15T00:00', end: '2026-11-18T00:00', color: '#f4511e' },
],
[],
);
const myColors = useMemo<MbscCalendarColor[]>(
() => [
{ recurring: { repeat: 'yearly', month: 12, day: 8 }, background: '#9ccc65' },
{ recurring: { repeat: 'yearly', month: 5, day: 1 }, background: 'red' },
{ recurring: { repeat: 'yearly', month: 12, day: 24 }, background: '#fff568' },
{ recurring: { repeat: 'yearly', month: 12, day: 25 }, background: '#e88080' },
{ date: '2026-11-04T00:00', background: '#cfd8dc' },
{ date: '2026-12-24T00:00', background: '#9575cd' },
{ date: '2026-08-13T00:00', background: '#d4e157' },
{ date: '2026-09-06T00:00', background: '#f4511e' },
{ date: '2026-11-06T00:00', background: '#46c4f3' },
{ date: '2026-11-22T00:00', background: '#7e56bd' },
{ date: '2026-09-11T00:00', background: '#46c4f3' },
{ date: '2026-09-29T00:00', background: '#7e56bd' },
{ date: '2026-10-02T00:00', background: '#46c4f3' },
{ date: '2026-10-03T00:00', background: '#7e56bd' },
{ date: '2026-10-11T00:00', background: '#f13f77' },
{ date: '2026-10-19T00:00', background: '#8dec7d' },
{ date: '2026-10-28T00:00', background: '#ea4986' },
{ start: '2026-11-15T00:00', end: '2026-11-18T00:00', text: 'Conference', background: '#f4511e' },
],
[],
);
const myLabels = useMemo<MbscCalendarLabel[]>(
() => [
{ recurring: { repeat: 'yearly', month: 12, day: 25 }, title: 'Christmas', color: '#f48fb1' },
{ recurring: { repeat: 'yearly', month: 1, day: 1 }, title: 'New year' },
{ recurring: { repeat: 'yearly', month: 12, day: 1 }, title: 'Meeting', color: '#ffc400' },
{ date: '2026-11-04T00:00', text: 'Spa day', color: '#cfd8dc' },
{ date: '2026-12-24T00:00', text: 'BD Party', color: '#9ccc65' },
{ date: '2026-08-13T00:00', text: 'Exams', color: '#d4e157' },
{ date: '2026-09-06T00:00', text: 'Trip', color: '#f4511e' },
{ date: '2026-11-06T00:00', color: '#46c4f3', text: 'Pizza Night' },
{ date: '2026-11-22T00:00', color: '#7e56bd', text: 'Beerpong' },
{ date: '2026-09-11T00:00', color: '#46c4f3', text: 'Anniversary' },
{ date: '2026-09-29T00:00', color: '#7e56bd', text: 'Pete BD' },
{ date: '2026-10-02T00:00', color: '#46c4f3', text: 'Ana BD' },
{ date: '2026-10-03T00:00', color: '#7e56bd', text: 'Concert' },
{ date: '2026-10-11T00:00', color: '#f13f77', text: 'Trip' },
{ date: '2026-10-19T00:00', color: '#8dec7d', text: 'Math exam' },
{ date: '2026-10-28T00:00', color: '#ea4986', text: 'Party' },
{ start: '2026-11-15T00:00', end: '2026-11-18T00:00', text: 'Conference', color: '#f4511e' },
],
[],
);
return (
<Page>
<div className="mbsc-grid">
<div className="mbsc-row">
<div className="mbsc-col-sm-12 mbsc-col-md-4">
<div className="mbsc-form-group">
<div className="mbsc-form-group-title">Marked days</div>
<Datepicker select="range" showRangeLabels={false} display="inline" marked={myMarked} />
</div>
</div>
<div className="mbsc-col-sm-12 mbsc-col-md-4">
<div className="mbsc-form-group">
<div className="mbsc-form-group-title">Colored days</div>
<Datepicker select="range" showRangeLabels={false} display="inline" colors={myColors} />
</div>
</div>
<div className="mbsc-col-sm-12 mbsc-col-md-4">
<div className="mbsc-form-group">
<div className="mbsc-form-group-title">Labels</div>
<Datepicker select="range" showRangeLabels={false} display="inline" labels={myLabels} />
</div>
</div>
</div>
</div>
</Page>
);
};
export default App;