这是我的日历的一个(不完整,因为代码太多)视图
@using DayPilot.Web.Mvc;
@using DayPilot.Web.Mvc.Events.Calendar;
@{
ViewBag.Title = "Home Page";
}
<script src="@Url.Content("~/Scripts/DayPilot/daypilot-all.min.js")" type="text/javascript"></script>
<div>
@Html.DayPilotCalendar("dp", new DayPilotCalendarConfig
{
BackendUrl = Url.Action("Backend", "Calendar"),
ViewType = DayPilot.Web.Mvc.Enums.Calendar.ViewType.Week,
})
</div>
<button id="Day">Day</button>
<button id="Week">Week</button>
<button id="Month">Month</button>
如何使用按钮单击和 JavaScript 更改值,例如 ViewType?