search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Problem with callback handling of oneventmove

Asked by Geir-Tore Lindsve
14 years ago.
I have the following defined for the daypilotcalendar:

... EventMoveHandling="CallBack" oneventmove="DayPilotCalendar1_EventMove" ...

When I try to move an event, I get the following exception:

An exception was thrown in the server-side event handler:

System.ApplicationException: Unable to parse DateTime: 'NaN-NaN-NaNTNaN:NaN:NaN'. ---> System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
at System.DateTime.ParseExact(String s, String format, IFormatProvider provider)
at DayPilot.Utils.UrlEncoder.UrlDecodeDateTime(String input)
--- End of inner exception stack trace ---
at DayPilot.Utils.UrlEncoder.UrlDecodeDateTime(String input)
at DayPilot.Web.Ui.Events.EventMoveEventArgs..ctor(String[] arguments, String[] fields)
at DayPilot.Web.Ui.Events.ArgumentsParser.ExtractArguments(String ea, String[] fields)
at DayPilot.Web.Ui.DayPilotCalendar.executeEvent(String ea, EventSource src)
at DayPilot.Web.Ui.DayPilotCalendar.System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(String ea)
at System.Web.UI.Page.PrepareCallback(String callbackControlID)

Any idea what might cause this?
Comment posted by Geir-Tore Lindsve
14 years ago.

My event handler:

protected void DayPilotCalendar1_EventMove(object sender, EventMoveEventArgs e)

And I'm using DayPilotPro 4.8.1438.0
Comment posted by Geir-Tore Lindsve
14 years ago.
More info:
Almost the same happens when using PostBack handling inside an updatepanel. The error dialog is a bit different, but the problem is the same --> problems parsing a NaN datetime string.
Comment posted by Dan Letecky
14 years ago.
A quick question: Do you define the columns manually (using ViewType="Resources")? It seems like the Column.Date property is not set.
Comment posted by Geir-Tore Lindsve
14 years ago.
Here is the complete markup for the calendar:

<DayPilot:DayPilotCalendar ID="DayPilotCalendar1" runat="server" Width="445px" BackColor="White" BorderColor="#3C78B5"
BusinessBeginsHour="8" BusinessEndsHour="16" Days="5" TimeFormat="Clock24Hours" ScrollPositionHour="7"
HeaderFontColor="#7E93CF" EventBackColor="#C4D6EB" EventBorderColor="#3C78B5" HourBorderColor="#A5BFE1" HourHalfBorderColor="#E6EDF7" HourNameBackColor="#E3EFFF"
HourNameBorderColor="#6593CF" HourFontColor="#6593CF" HeaderHeight="38" NonBusinessBackColor="#E6EDF7" HeaderDateFormat="dddd dd.MM.yyyy"
DataEndField="end" DataStartField="start" DataTextField="name" DataValueField="id"
LoadingLabelText="Laster..." ScrollDownLabelText="Rull ned" ScrollUpLabelText="Rull opp" ClientObjectName="dpc1"
TimeRangeSelectedHandling="PostBack" OnTimeRangeSelected="DayPilotCalendar1_TimeRangeSelected"
EventDeleteHandling="JavaScript" EventDeleteJavaScript="customDelete(e)" OnEventDelete="DayPilotCalendar1_EventDelete"
EventClickHandling="JavaScript" EventClickJavaScript="openHenvendelse(e)"
EventMoveHandling="PostBack" OnEventMove="DayPilotCalendar1_EventMove"
EventResizeHandling="PostBack" OnEventResize="DayPilotCalendar1_EventResize" />
Comment posted by Geir-Tore Lindsve
14 years ago.
The short answer would be no, but I added the complete markup so you have everything.

Here is an example eventArgument sent to IPostBackEventHandler.RaisePostBackEvent in DayPilotCalendar.cs when trying to move an event:

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.