Cell Hover Highlight
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
clickToCreate={true}
// click to create is on dragToCreate={true}
// drag to create is on dragToMove={true}
// reordering is on dragToResize={true}
// resizing is on eventDelete={true}
// deleting is on Fine-tune drag & drop with these options, which are false by default.
Usage
locale={localeEn} Selecting the locale loads the localized settings and the translated UI text.
Cell Hover Highlight
Highlight the resource row and date column on cell hover to improve usability by clearly showing where the user is interacting.
This is achieved using the onCellHoverIn and onCellHoverOut lifecycle events. These track the hovered cell and update the resources with a custom cssClass, which highlights the resource row. A popup is also shown on hover, displaying relevant information about the cell like the date and resource name.
The column highlight is applied using the renderCell, renderSidebar, renderTimelineDay, and renderDayFooter callbacks, where conditional markup is returned to highlight the vertical column.
This makes it easy to implement custom hover interactions that match your design and UX goals.
Demo

Code
View code on GitHub
import { Eventcalendar, formatDate, Popup, setOptions } from '@mobiscroll/react';
import { useCallback, useMemo, useState } from 'react';
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
function App() {
const [hoverDate, setHoverDate] = useState(null);
const [hoverResource, setHoverResource] = useState(null);
const [anchor, setAnchor] = useState(null);
const [isPopupOpen, setPopupOpen] = useState(false);
const myView = useMemo(
() => ({
timeline: {
type: 'month',
resolutionHorizontal: 'day',
},
}),
[],
);
const myEvents = useMemo(
() => [
{ start: '2026-10-02T00:00', end: '2026-10-05T00:00', title: 'Event 1', resource: 1 },
{ start: '2026-10-10T09:00', end: '2026-10-15T15:00', title: 'Event 2', resource: 3 },
{ start: '2026-10-12T00:00', end: '2026-10-14T00:00', title: 'Event 3', resource: 4 },
{ start: '2026-10-15T07:00', end: '2026-10-20T12:00', title: 'Event 4', resource: 5 },
{ start: '2026-10-03T00:00', end: '2026-10-10T00:00', title: 'Event 5', resource: 6 },
{ start: '2026-10-10T08:00', end: '2026-10-11T20:00', title: 'Event 6', resource: 7 },
{ start: '2026-10-22T00:00', end: '2026-10-28T00:00', title: 'Event 7', resource: 7 },
{ start: '2026-10-08T00:00', end: '2026-10-13T00:00', title: 'Event 8', resource: 15 },
{ start: '2026-10-25T00:00', end: '2026-10-27T00:00', title: 'Event 9', resource: 10 },
{ start: '2026-10-20T00:00', end: '2026-10-23T00:00', title: 'Event 10', resource: 12 },
],
[],
);
const [myResources, setResources] = useState([
{ id: 1, name: 'Resource A', color: '#e20000' },
{ id: 2, name: 'Resource B', color: '#76e083' },
{ id: 3, name: 'Resource C', color: '#4981d6' },
{ id: 4, name: 'Resource D', color: '#e25dd2' },
{ id: 5, name: 'Resource E', color: '#1dab2f' },
{ id: 6, name: 'Resource F', color: '#d6d145' },
{ id: 7, name: 'Resource G', color: '#34c8e0' },
{ id: 8, name: 'Resource H', color: '#9dde46' },
{ id: 9, name: 'Resource I', color: '#166f6f' },
{ id: 10, name: 'Resource J', color: '#f7961e' },
{ id: 11, name: 'Resource K', color: '#34c8e0' },
{ id: 12, name: 'Resource L', color: '#af0000' },
{ id: 13, name: 'Resource M', color: '#446f1c' },
{ id: 14, name: 'Resource N', color: '#073138' },
{ id: 15, name: 'Resource O', color: '#4caf00' },
]);
const handleCellHoverIn = useCallback((args) => {
setResources((prevResources) => {
const updated = prevResources.map((r) => ({
...r,
cssClass: r.id === args.resource.id ? 'mds-highlight-row-hover' : '',
}));
setHoverResource(updated.find((r) => r.id === args.resource.id));
return updated;
});
setHoverDate(args.date);
setAnchor(args.domEvent.target);
setPopupOpen(true);
}, []);
const handleCellHoverOut = useCallback(() => {
setHoverDate(null);
setHoverResource(null);
setResources((prevResources) => prevResources.map((r) => ({ ...r, cssClass: '' })));
setPopupOpen(false);
}, []);
const renderCell = useCallback(
(args) => {
const isHover = hoverDate && args.date.getTime() === hoverDate.getTime();
return isHover ? <div className="mds-highlight-col-hover" /> : null;
},
[hoverDate],
);
const renderSidebar = useCallback((resource) => <div>{resource.name} Sidebar</div>, []);
const renderTimelineDay = useCallback(
(day) => {
const isHover = hoverDate && day.date.getTime() === hoverDate.getTime();
const hoverClass = isHover ? ' mds-highlight-col-hover' : '';
return <div className={'mds-highlight-day-content' + hoverClass}>{formatDate('D DDD', day.date)}</div>;
},
[hoverDate],
);
const renderDayFooter = useCallback(
(day) => {
const isHover = hoverDate && day.date.getTime() === hoverDate.getTime();
const hoverClass = isHover ? ' mds-highlight-col-hover' : '';
return <div className={'mds-highlight-day-content' + hoverClass}>{formatDate('D DDD', day.date)}</div>;
},
[hoverDate],
);
return (
<>
<Eventcalendar
cssClass="mds-highlight-hover"
data={myEvents}
resources={myResources}
renderCell={renderCell}
renderSidebar={renderSidebar}
renderTimelineDay={renderTimelineDay}
renderDayFooter={renderDayFooter}
onCellHoverIn={handleCellHoverIn}
onCellHoverOut={handleCellHoverOut}
view={myView}
/>
<Popup
anchor={anchor}
closeOnScroll={true}
display="anchored"
focusOnClose={false}
isOpen={isPopupOpen}
scrollLock={false}
showOverlay={false}
>
{hoverResource && hoverDate && (
<div className="mds-highlight-tooltip">
<div className="mds-highlight-tooltip-name">{hoverResource.name}</div>
<div className="mds-highlight-tooltip-date">{formatDate('MMM DD, YYYY', hoverDate)}</div>
</div>
)}
</Popup>
</>
);
}
export default App;
import {
Eventcalendar,
formatDate,
MbscCalendarCellData,
MbscCalendarDayData,
MbscCalendarEvent,
MbscCellHoverEvent,
MbscEventcalendarView,
MbscResource,
Popup,
setOptions ,
} from '@mobiscroll/react';
import { FC, useCallback, useMemo, useState } from 'react';
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
const App: FC = () => {
const [hoverDate, setHoverDate] = useState<Date | null>(null);
const [hoverResource, setHoverResource] = useState<MbscResource | null>(null);
const [anchor, setAnchor] = useState<HTMLElement>();
const [isPopupOpen, setPopupOpen] = useState<boolean>(false);
const myView = useMemo<MbscEventcalendarView>(
() => ({
timeline: {
type: 'month',
resolutionHorizontal: 'day',
},
}),
[],
);
const myEvents = useMemo<MbscCalendarEvent[]>(
() => [
{ start: '2026-10-02T00:00', end: '2026-10-05T00:00', title: 'Event 1', resource: 1 },
{ start: '2026-10-10T09:00', end: '2026-10-15T15:00', title: 'Event 2', resource: 3 },
{ start: '2026-10-12T00:00', end: '2026-10-14T00:00', title: 'Event 3', resource: 4 },
{ start: '2026-10-15T07:00', end: '2026-10-20T12:00', title: 'Event 4', resource: 5 },
{ start: '2026-10-03T00:00', end: '2026-10-10T00:00', title: 'Event 5', resource: 6 },
{ start: '2026-10-10T08:00', end: '2026-10-11T20:00', title: 'Event 6', resource: 7 },
{ start: '2026-10-22T00:00', end: '2026-10-28T00:00', title: 'Event 7', resource: 7 },
{ start: '2026-10-08T00:00', end: '2026-10-13T00:00', title: 'Event 8', resource: 15 },
{ start: '2026-10-25T00:00', end: '2026-10-27T00:00', title: 'Event 9', resource: 10 },
{ start: '2026-10-20T00:00', end: '2026-10-23T00:00', title: 'Event 10', resource: 12 },
],
[],
);
const [myResources, setResources] = useState<MbscResource[]>([
{ id: 1, name: 'Resource A', color: '#e20000' },
{ id: 2, name: 'Resource B', color: '#76e083' },
{ id: 3, name: 'Resource C', color: '#4981d6' },
{ id: 4, name: 'Resource D', color: '#e25dd2' },
{ id: 5, name: 'Resource E', color: '#1dab2f' },
{ id: 6, name: 'Resource F', color: '#d6d145' },
{ id: 7, name: 'Resource G', color: '#34c8e0' },
{ id: 8, name: 'Resource H', color: '#9dde46' },
{ id: 9, name: 'Resource I', color: '#166f6f' },
{ id: 10, name: 'Resource J', color: '#f7961e' },
{ id: 11, name: 'Resource K', color: '#34c8e0' },
{ id: 12, name: 'Resource L', color: '#af0000' },
{ id: 13, name: 'Resource M', color: '#446f1c' },
{ id: 14, name: 'Resource N', color: '#073138' },
{ id: 15, name: 'Resource O', color: '#4caf00' },
]);
const handleCellHoverIn = useCallback((args: MbscCellHoverEvent) => {
setResources((prevResources) => {
const updated = prevResources.map((r) => ({
...r,
cssClass: r.id === args.resource.id ? 'mds-highlight-row-hover' : '',
}));
setHoverResource(updated.find((r) => r.id === args.resource.id) || null);
return updated;
});
setHoverDate(args.date);
setAnchor(args.domEvent.target as HTMLElement);
setPopupOpen(true);
}, []);
const handleCellHoverOut = useCallback(() => {
setHoverDate(null);
setHoverResource(null);
setResources((prevResources) => prevResources.map((r) => ({ ...r, cssClass: '' })));
setPopupOpen(false);
}, []);
const renderCell = useCallback(
(args: MbscCalendarCellData) => {
const isHover = hoverDate && args.date.getTime() === hoverDate.getTime();
return isHover ? <div className="mds-highlight-col-hover" /> : null;
},
[hoverDate],
);
const renderSidebar = useCallback((resource: MbscResource) => <div>{resource.name} Sidebar</div>, []);
const renderTimelineDay = useCallback(
(day: MbscCalendarDayData) => {
const isHover = hoverDate && day.date.getTime() === hoverDate.getTime();
const hoverClass = isHover ? ' mds-highlight-col-hover' : '';
return <div className={'mds-highlight-day-content' + hoverClass}>{formatDate('D DDD', day.date)}</div>;
},
[hoverDate],
);
const renderDayFooter = useCallback(
(day: MbscCalendarDayData) => {
const isHover = hoverDate && day.date.getTime() === hoverDate.getTime();
const hoverClass = isHover ? ' mds-highlight-col-hover' : '';
return <div className={'mds-highlight-day-content' + hoverClass}>{formatDate('D DDD', day.date)}</div>;
},
[hoverDate],
);
return (
<>
<Eventcalendar
cssClass="mds-highlight-hover"
data={myEvents}
resources={myResources}
renderCell={renderCell}
renderSidebar={renderSidebar}
renderTimelineDay={renderTimelineDay}
renderDayFooter={renderDayFooter}
onCellHoverIn={handleCellHoverIn}
onCellHoverOut={handleCellHoverOut}
view={myView}
/>
<Popup
anchor={anchor}
closeOnScroll={true}
display="anchored"
focusOnClose={false}
isOpen={isPopupOpen}
scrollLock={false}
showOverlay={false}
>
{hoverResource && hoverDate && (
<div className="mds-highlight-tooltip">
<div className="mds-highlight-tooltip-name">{hoverResource.name}</div>
<div className="mds-highlight-tooltip-date">{formatDate('MMM DD, YYYY', hoverDate)}</div>
</div>
)}
</Popup>
</>
);
};
export default App;
.mds-highlight-hover .mbsc-timeline-sidebar-col {
width: 170px;
}
.mds-highlight-hover .mbsc-timeline-sidebar-resource-title {
font-weight: 500;
}
.mds-highlight-hover .mds-highlight-row-hover,
.mds-highlight-hover .mds-highlight-col-hover {
background: rgba(220, 220, 220, 0.25);
}
.mds-highlight-col-hover {
position: absolute;
inset: 0;
background: transparent;
pointer-events: none;
box-sizing: border-box;
}
.mds-highlight-day-content {
font-size: 14px;
height: 30px;
text-align: center;
line-height: 30px;
position: relative;
}
.mds-highlight-tooltip {
padding: 5px;
font-size: 14px;
line-height: 1.4;
}
.mds-highlight-tooltip-name {
font-weight: bold;
margin-bottom: 5px;
}
.mds-highlight-tooltip-date {
color: #888;
}