Calendar Pro error with date/time format

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
9/26/2011 7:47:15 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Calendar Pro error with date/time format

Hi Joe

WE have a user who gets an error when they try to create an event in the Calendar Pro. I think it is because of date/time formats - this from system log:

2011-09-26 12:06:12,160 ERROR (null) - (null) - (null) - mojoPortal.Web.Global - 82.69.48.10-en-GB - /Events/EditEvent.aspx?mid=37&pageid=28- Referrer(http://www.lharmojo.no-ip.org/Events/EditEvent.aspx?mid=37&pageid=28)
System.FormatException: String was not recognized as a valid DateTime.
   at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
   at sts.Events.Web.UI.Controls.EventEditor.SaveEvent(Boolean updateRecurrences)
   at sts.Events.Web.UI.Controls.EventEditor.btnUpdate_Click(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I suspect the problem is caused by this in user.config:

<!-- to force UK dates - Chrome was persisting in showing US dates -->
    <add key="site1culture" value="en-GB" />
    <add key="UseCultureOverride" value="true" />

My guess is the user has their browser (Chrome) set with "English (United States)" top of the list, so perhaps the posted date string (UK format) does not match the headers. It works for me, with browser properly set in UK.

If I get any more information to confirm or change the above I'll post it,

cheers

 

9/26/2011 7:54:19 AM
Gravatar
Total Posts 18439

Re: Calendar Pro error with date/time format

Hi Crispin,

When you force a specific culture from user.config it doesn't matter what the browser has configured in the browser, the thread will execute as the forced culture. As you can see the log entry includes the culture en-GB that the thread is executing as at the time of the error.

However, if the user is manually entering dates in en-US format then it will not parse correctly as en-GB so it will cause an error. I don't really know a good solution other than that all the editors use en-GB format when entering dates. The date picker should format it correctly but if the user manually changes it, that would cause an error.

Best,

Joe

9/26/2011 9:56:31 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Calendar Pro error with date/time format

Hi Joe

Turns out dates was a red herring ... the user has diagnosed the cause of the crash, and it is deleting the content of the "until" field on the "Repeats" line. I have replicated this - clearing that field then saving causes the error.  (The user cleared this because she had set "Does not repeat" and wanted to make extra sure!).  So perhaps a teeny bug after all!

cheers

You must sign in to post in the forums. This thread is closed to new posts.