Hi,
You can use the “view” property to switch the views in jqxScheduler.
<div id="scheduler"></div>
<button id="dayBtn">Day</button>
<button id="timelineBtn">Timeline</button>
<script>
$(document).ready(function () {
// initialize scheduler
$("#scheduler").jqxScheduler({
date: new $.jqx.date(2025, 8, 19),
width: 850,
height: 600,
source: new $.jqx.dataAdapter({ localData: [], dataType: "array" }),
showLegend: true,
view: 'dayView',
views: ['dayView', 'weekView', 'monthView', 'timelineDayView', 'timelineWeekView']
});
// switch to normal day view
$("#dayBtn").on("click", function () {
$("#scheduler").jqxScheduler("view", "dayView");
});
// switch to timeline view
$("#timelineBtn").on("click", function () {
$("#scheduler").jqxScheduler("view", "timelineDayView");
});
});
</script>
Best regards,
Peter Stoev
jQWidgets Team
https://www.jqwidgets.com/