This topic is locked

aspro edit past events

7/1/2010 3:29:23 PM
Calendar Template general questions
A
andres author

Hi All,
I found the post for solving phprunner edit events in the past. Could anyone please help with a solution to add and edit events in the past with ASPRUNNERPRO.
Thank you
andre

A
ann 7/9/2010

Andres,
proceed to the Before display event on theEvents tab of the caldaily view and comment the line:

if datediff("d",date,cdate(session("yr") & "-" & session("mon") & "-" & session("days")))>=0 then xt.assign_p2 "row00AddHideDvalue",""



then in the Before record added event comment (or delete) all ELSEIF operators:

elseif (datediff("n",now(),cdate(values("DateField") & " " & values("TimeField")))<0 and values("Recurrence")<>1 or datediff("d",now(),cdate(values("DateField")))<0 and values("Recurrence")=1) and values("DayEvent")<>1 or datediff("d",now(),cdate(values("DateField")))<0 and values("DayEvent")=1 then

if session("row00window_value")="daily" or session("row00window_value")="calendar" then

message="<span style=""color:red"" class=message>Invalid event date or time</span>"

else

response.write "<script>alert(""Invalid event date or time"");</script>"

end if

BeforeAdd = False

elseif values("Recurrence")=1 and datediff("d",cdate(values("EndDate")),cdate(values("DateField")))>=0 then

if session("row00window_value")="daily" or session("row00window_value")="calendar" then

message="<span style=""color:red"" class=message>Invalid event end date or time</span>"

else

response.write "<script>alert(""Invalid event end date or time"");</script>"

end if

BeforeAdd = False

elseif datediff("n",cdate(values("DateField") & " " & values("TimeField")),cdate(values("DateField") & " " & values("EndTime")))<0 and values("DayEvent")<>1 and values("Recurrence")<>1 and values("EndTime")<>"" then

if session("row00window_value")="daily" or session("row00window_value")="calendar" then

message="<span style=""color:red"" class=message>Invalid event time</span>"

else

response.write "<script>alert(""Invalid event time"");</script>"

end if

BeforeAdd = False

else

BeforeAdd = True

end if



and add just after:

BeforeAdd = True