I'm having a weird issue. I've added buttons for "Previous", "Today", and "Next" to jump to the next or previous day, week, or month. I copy and pasted the sample code from your tutorial but no matter what i do, every time i press the "next" or "previous" buttons it will jump twice the intended value. If i am in Day View and today is the 15th, it will load the 17th when "next" is pressed, and the 13th when "previous" is pressed. "Today" is the only thing that works. Below is the code for DayView. But it happens the same for Month View and Week View. In Month View it will jump to March (this month is January). In week view it will jump 14 days instead of 7. Below is the code being used on DayView. It is the same for Week and Month except for what is being added. I'm using the newest version of DayPilotPro 8.4.3630. Any help would be appreciated.
<div class="space">
Day:
<a href="javascript:dp_day.commandCallBack('previous');">Previous</a>
|
<a href="javascript:dp_day.commandCallBack('today');">Today</a>
|
<a href="javascript:dp_day.commandCallBack('next');">Next</a>
</div>
Protected Sub DayPilotCalendarDay_Command(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.CommandEventArgs) Handles DayPilotCalendarDay.Command
Select Case e.Command
Case "previous"
DayPilotCalendarDay.StartDate = DayPilotCalendarDay.StartDate.AddDays(-1)
DayPilotCalendarDay.DataBind()
DayPilotCalendarDay.Update()
Case "next"
DayPilotCalendarDay.StartDate = DayPilotCalendarDay.StartDate.AddDays(1)
DayPilotCalendarDay.DataBind()
DayPilotCalendarDay.Update()
Case "today"
DayPilotCalendarDay.StartDate = DateTime.Today
DayPilotCalendarDay.DataSource = GetData(DateTime.Today, DateTime.Today.AddDays(1))
DayPilotCalendarDay.DataBind()
DayPilotCalendarDay.Update()
End Select
End Sub