Using as a tooltip
Usage
theme="ios" You can turn auto theming on and let it decide based on the platform.
Usage
themeVariant="light" You can turn auto dark mode on based on system settings.
Usage
touchUi={true}
// touch interaction is enabled Use touch interaction on mobile or pointer interaction on desktop.
Usage
locale={localeEn} Selecting the locale loads the localized settings and the translated UI text.
Using as a tooltip
Use the popup as a tooltip that gives a quick glance at more event details than just the labels. This approach is perfect for providing access to information without cluttering the interface.
The popup takes care of auto-positioning, taking the guesswork out of where it should show up. It also gives you full control over the content where you can use any Mobiscroll or custom component.
Looking for more advanced event tooltip ideas? Check out this example →
Demo
Code
View code on GitHub
import { Eventcalendar, formatDate, Page, Popup, setOptions } from '@mobiscroll/react';
import { useCallback, useMemo, useRef, useState } from 'react';
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
function App() {
const myEvents = useMemo(
() => [
{
title: 'CEO Strategy Meeting',
start: '2026-10-01T10:00',
end: '2026-10-01T11:00',
color: '#FF5733',
},
{
title: 'Board of Directors Briefing',
start: '2026-10-03T14:00',
end: '2026-10-03T15:00',
color: '#33C4FF',
},
{
title: 'Quarterly Review',
start: '2026-10-05T09:00',
end: '2026-10-05T10:00',
color: '#33FF77',
},
{
title: 'Executive Team Lunch',
start: '2026-10-07T12:00',
end: '2026-10-07T13:00',
color: '#FFC733',
},
{
title: 'Investor Meeting',
start: '2026-10-10T11:00',
end: '2026-10-10T12:00',
color: '#9B59B6',
},
{
title: 'Product Launch Review',
start: '2026-10-12T13:00',
end: '2026-10-12T14:00',
color: '#FF6347',
},
{
title: 'Press Conference Preparation',
start: '2026-10-14T16:00',
end: '2026-10-14T17:00',
color: '#1E90FF',
},
{
title: 'Client Partnership Discussion',
start: '2026-10-18T10:00',
end: '2026-10-18T11:00',
color: '#FFD700',
},
{
title: 'CEO’s Weekly Report',
start: '2026-10-20T09:00',
end: '2026-10-20T10:00',
color: '#20B2AA',
},
{
title: 'Town Hall Meeting',
start: '2026-10-25T14:00',
end: '2026-10-25T15:00',
color: '#FF4500',
},
],
[],
);
const [isPopupOpen, setPopupOpen] = useState(false);
const [myAnchor, setAnchor] = useState();
const [eventTitle, setEventTitle] = useState({});
const [eventStart, setEventStart] = useState({});
const [eventEnd, setEventEnd] = useState({});
const timerRef = useRef(null);
const handleEventHoverIn = useCallback((args) => {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
setEventTitle(args.event.title);
setEventStart(formatDate('hh:mm A', new Date(args.event.start)));
setEventEnd(formatDate('hh:mm A', new Date(args.event.end)));
setAnchor(args.domEvent.target);
setPopupOpen(true);
}, []);
const handleEventHoverOut = useCallback(() => {
timerRef.current = setTimeout(() => {
setPopupOpen(false);
}, 200);
}, []);
const handleMouseEnter = useCallback(() => {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
}, []);
const handleMouseLeave = useCallback(() => {
timerRef.current = setTimeout(() => {
setPopupOpen(false);
}, 200);
}, []);
const myView = useMemo(
() => ({
calendar: { type: 'month' },
}),
[],
);
return (
<Page>
<Eventcalendar data={myEvents} view={myView} onEventHoverIn={handleEventHoverIn} onEventHoverOut={handleEventHoverOut} />
<Popup display="anchored" anchor={myAnchor} touchUi={false} isOpen={isPopupOpen} width={250} showOverlay={false}>
<div onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>
<div className="mds-tooltip-event-title-cont">
<span>{eventTitle}</span>
</div>
<div className="mds-tooltip-start-cont mbsc-flex">
<span className="mds-tooltip-label">Start:</span>
<span>{eventStart}</span>
</div>
<div className="mds-tooltip-end-cont mbsc-flex">
<span className="mds-tooltip-label">End:</span>
<span>{eventEnd}</span>
</div>
</div>
</Popup>
</Page>
);
}
export default App;
import {
Eventcalendar,
formatDate,
MbscCalendarEvent,
MbscEventcalendarView,
Page,
Popup,
setOptions ,
} from '@mobiscroll/react';
import { useCallback, useMemo, useRef, useState } from 'react';
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
function App() {
const myEvents = useMemo<MbscCalendarEvent[]>(
() => [
{
title: 'CEO Strategy Meeting',
start: '2026-10-01T10:00',
end: '2026-10-01T11:00',
color: '#FF5733',
},
{
title: 'Board of Directors Briefing',
start: '2026-10-03T14:00',
end: '2026-10-03T15:00',
color: '#33C4FF',
},
{
title: 'Quarterly Review',
start: '2026-10-05T09:00',
end: '2026-10-05T10:00',
color: '#33FF77',
},
{
title: 'Executive Team Lunch',
start: '2026-10-07T12:00',
end: '2026-10-07T13:00',
color: '#FFC733',
},
{
title: 'Investor Meeting',
start: '2026-10-10T11:00',
end: '2026-10-10T12:00',
color: '#9B59B6',
},
{
title: 'Product Launch Review',
start: '2026-10-12T13:00',
end: '2026-10-12T14:00',
color: '#FF6347',
},
{
title: 'Press Conference Preparation',
start: '2026-10-14T16:00',
end: '2026-10-14T17:00',
color: '#1E90FF',
},
{
title: 'Client Partnership Discussion',
start: '2026-10-18T10:00',
end: '2026-10-18T11:00',
color: '#FFD700',
},
{
title: 'CEO’s Weekly Report',
start: '2026-10-20T09:00',
end: '2026-10-20T10:00',
color: '#20B2AA',
},
{
title: 'Town Hall Meeting',
start: '2026-10-25T14:00',
end: '2026-10-25T15:00',
color: '#FF4500',
},
],
[],
);
const [isPopupOpen, setPopupOpen] = useState<boolean>(false);
const [myAnchor, setAnchor] = useState<HTMLElement>();
const [eventTitle, setEventTitle] = useState<string>('');
const [eventStart, setEventStart] = useState<string>('');
const [eventEnd, setEventEnd] = useState<string>('');
const timerRef = useRef<ReturnType<typeof setTimeout>>(undefined);
const handleEventHoverIn = useCallback((args: MbscCalendarEvent) => {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
setEventTitle(args.event.title);
setEventStart(formatDate('hh:mm A', new Date(args.event.start)));
setEventEnd(formatDate('hh:mm A', new Date(args.event.end)));
setAnchor(args.domEvent.target as HTMLElement);
setPopupOpen(true);
}, []);
const handleEventHoverOut = useCallback(() => {
timerRef.current = setTimeout(() => {
setPopupOpen(false);
}, 200);
}, []);
const handleMouseEnter = useCallback(() => {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
}, []);
const handleMouseLeave = useCallback(() => {
timerRef.current = setTimeout(() => {
setPopupOpen(false);
}, 200);
}, []);
const myView = useMemo<MbscEventcalendarView>(
() => ({
calendar: { type: 'month' },
}),
[],
);
return (
<Page>
<Eventcalendar data={myEvents} view={myView} onEventHoverIn={handleEventHoverIn} onEventHoverOut={handleEventHoverOut} />
<Popup display="anchored" anchor={myAnchor} touchUi={false} isOpen={isPopupOpen} width={250} showOverlay={false}>
<div onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>
<div className="mds-tooltip-event-title-cont">
<span>{eventTitle}</span>
</div>
<div className="mds-tooltip-start-cont mbsc-flex">
<span className="mds-tooltip-label">Start:</span>
<span>{eventStart}</span>
</div>
<div className="mds-tooltip-end-cont mbsc-flex">
<span className="mds-tooltip-label">End:</span>
<span>{eventEnd}</span>
</div>
</div>
</Popup>
</Page>
);
}
export default App;
.mds-tooltip-event-title-cont {
margin-bottom: 15px;
text-align: center;
font-size: 16px;
}
.mds-tooltip-start-cont,
.mds-tooltip-end-cont {
justify-content: space-between;
margin-bottom: 5px;
font-size: 14px;
padding: 5px 0;
border-bottom: 1px solid #ddd;
}
.mds-tooltip-label {
font-weight: 600;
}