This topic is locked
[SOLVED]

 Dragging Recurring Event And Single Date Events Not Working

4/23/2013 10:47:23 PM
Calendar Template general questions
M
mitzi author

Hi, I have been trying to fix the drag and drop problem for 4 days already - it is either one way or the other. could you please help?

I have posted my problem to demo account already.
the problem probably resides within these pages - of the calmonthly view:
List page: before process, andlist page: before display
in the list page: before processthe minute we announce EndDate as .....("d", razn(EndDate)) the single day event draggin stops working,
as soon as you announce EndDate as ("d", razn(rsmtp("EndDate") the reccurring events start dragging, but the single day event dragging function stops.
another interesting observation:
list page:before process:
Category=rstmp("Category")

categ1=""

categ2=""

if Category<>"" and not isnull(Category) then

categ1=AddFieldWrappers("Category") & ","

categ2=Category & ","

if we removelast three lines
change this line EndDate=dateadd("d",razn("EndDate"))
into

EndDate=dateadd("d",razn,rstmp("EndDate"))
below are dragging codes for the calmonthly list page:before display page for singe and recurring events respectively
tmpSQL="insert into " & AddTableWrappers("calcalendar") & " (" & AddFieldWrappers("DateField") & "," & AddFieldWrappers("Address") & "," & categ1 & AddFieldWrappers("Description") & "," & AddFieldWrappers("DayEvent") & "," & AddFieldWrappers("TimeField") & "," & AddFieldWrappers("Recurrence") & "," & AddFieldWrappers("EndTime") & "," & AddFieldWrappers("EndDate") & "," & AddFieldWrappers("Period") & "," & AddFieldWrappers("OwnerID") & "," & AddFieldWrappers("EmployeeName") & "," & AddFieldWrappers("EmployeeTel") & "," & AddFieldWrappers("EmployeeRate") & "," & AddFieldWrappers("TotalHrs") & ") values ('" & DateField & "','" & replace(Subject,"'","''") & "'," & categ2 & "'" & replace(Desc,"'","''") & "'," & DayEvent & ",'" & TimeField & "'," & Recurrence & ",'" & EndTime & "','" & EndDate & "','" & Period & "','" & OwnerId & "','" & EmployeeName & "','" & EmployeeTel & "','" & EmployeeRate & "','" & TotalHrs & "')"
for your information
if not rstmp.eof then

Subject=rstmp("Address")
and

Desc=rstmp("Description")
single day event
if session("UserId")<>"Guest" then strRow=strRow & "style=""cursor:move;"" onmousedown='CopyMess(event," & rstmp2("id")& ");cell_day_begin=" & Day(rstmp2("DateField")) & ";recurr=""0"";'"
reccuring events
if session("UserId")<>"Guest" then strRow=strRow & "style=""cursor:move;z-index:1;"" onmousedown='CopyMess(event," & rstmp2("id")& ");cell_day_begin=" & Day(newdate) & ";recurr=""" & newdate & """;'"
the both events become draggable BUT
whenreccuring event is dragged it defaults to 6/4/1905 like a TIME travel <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=20910&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />

and I am stumbled for the last 4 days trying to figure out why.
I have tried endlessly multiple combinations - to no avail.

Please help me to figure it out

M
mitzi author 4/24/2013

solved by your team today, thank you:)

I customized it a little bit toallow Category to be dragged as well, so ok this issue is solved.