How about using SQL BETWEEN?
(EventFrom BETWEEN @startDate and @endDate)
(EventToBETWEEN @startDate and @endDate)
What I'm not sure of, is how to update the Parameters of the ASP SQLdataSource I use to populate the DayPilotSchedule.
SqlDataSourceEvents.SelectParameters["start"].DefaultValue = DateTime.Today.ToString("s");
<asp:ControlParameter Name="start" ControlID="DayPilotCalendar1" PropertyName="StartDate" />
Where would you put this?
Would it go everywhere you call DayPilotScheduler1.DataBind() ?
Private Sub DayPilotScheduler1_Refresh(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.RefreshEventArgs) Handles DayPilotScheduler1.Refresh 'here? DayPilotScheduler1.DataBind() DayPilotScheduler1.Update()
> Would it go everywhere you call DayPilotScheduler1.DataBind() ?
Yes, exactly - before the DataBind() call.
See also this thread for an alternative SQL SELECT:
It's called "testing for overlapping events" but it's the same logic.
Ron, you need to paste your code in the WYSIWYG mode, not in the source (HTML) mode.
You can also send it to firstname.lastname@example.org.