
I’m posting a sample that works fine:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>test-scheduler-row-lines</title>
<style type="text/css">
p, body, td, input, select, button { font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 14px; }
body { padding: 0px; margin: 0px; background-color: #ffffff; }
a { color: #1155a3; }
.space { margin: 10px 0px 10px 0px; }
.header { background: #003267; background: linear-gradient(to right, #011329 0%,#00639e 44%,#011329 100%); padding:20px 10px; color: white; box-shadow: 0px 0px 10px 5px rgba(0,0,0,0.75); }
.header a { color: white; }
.header h1 a { text-decoration: none; }
.header h1 { padding: 0px; margin: 0px; }
.main { padding: 10px; margin-top: 10px; }
.generated { color: #999; }
.generated a { color: #999; }
</style>
<!-- DayPilot library -->
<script src="js/daypilot/daypilot-all.min.js"></script>
</head>
<body>
<div class="header">
<h1>test-scheduler-row-lines</h1>
<div><a href="https://javascript.daypilot.org/">DayPilot for JavaScript</a> - HTML5 Calendar/Scheduling Components for JavaScript/Angular/React/Vue</div>
</div>
<div class="main">
<div id="dp"></div>
<div class="generated">Generated using <a href="https://builder.daypilot.org/">DayPilot UI Builder</a>.</div>
</div>
<style>
.scheduler_default_cell {
background: repeating-linear-gradient(
to bottom,
#e0e0e0 0,
#e0e0e0 1px,
transparent 1px,
transparent 60px
);
}
</style>
<script>
const dp = new DayPilot.Scheduler("dp", {
timeHeaders: [{"groupBy":"Month"},{"groupBy":"Day","format":"d"}, {groupBy: "Hour", format: "hh:mm"}],
scale: "Hour",
days: DayPilot.Date.today().daysInMonth(),
startDate: DayPilot.Date.today().firstDayOfMonth(),
onTimeRangeSelected: async (args) => {
const scheduler = args.control;
const modal = await DayPilot.Modal.prompt("Create a new event:", "Event 1");
scheduler.clearSelection();
if (modal.canceled) { return; }
scheduler.events.add({
start: args.start,
end: args.end,
id: DayPilot.guid(),
resource: args.resource,
text: modal.result
});
},
eventHeight: 60,
rowHeaderWidth: 0,
rowHeaderWidthAutoFit: false,
onBeforeCellRender: (args) => {
if (args.cell.start.getDatePart() === DayPilot.Date.today()) {
// light yellow
args.cell.properties.backColor = "#ffffe0";
}
}
});
dp.init();
const app = {
init() {
const resources = [
{name: "Resource 1", id: "R1"},
];
const events = [
{
start: DayPilot.Date.today().addHours(10),
end: DayPilot.Date.today().addHours(12),
id: DayPilot.guid(),
resource: "R1",
text: "Event 1"
},
{
start: DayPilot.Date.today().addHours(11),
end: DayPilot.Date.today().addHours(13),
id: DayPilot.guid(),
resource: "R1",
text: "Event 2"
}
];
dp.update({
resources,
events,
scrollTo: DayPilot.Date.today().addHours(8)
});
}
};
app.init();
</script>
</body>
</html>