This literally started happening at midnight last night.
Our MVC calendar shows dates loaded from a database in the format dd/MM/yyyy. This has been working fine for months.. and today, 1st of August (1/08/2011) it has just suddenly decided to stop working (and is now throwing the unrepresentable DateTime exception).
How can I force the date format? Or why would this be happening all of a sudden?
Regards,
Shane
9 Answers, 1 is accepted

I have removed everything from our database for the calendar.. which makes me think that the issue is with the calendar itself when it attempts to navigate to the current month.
Any help with this would be greatly appreciated.
Shane
Unfortunately this is not a known issue. Could you please elaborate more on this? Can you share with us some code snippets which helps to replicate the issue. A simple test project which can run locally will be really helpful.
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

@{Html.Telerik().Calendar() .Name("main-calendar") .Value(DateTime.Now) .Render(); }
The Render() method makes it fail.
Here is a screen-cast which shows that everything is fine on my end. Please let me know if I am missing something.
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Our Telerik version : 2011.1.315.340 ... we are testing the latest to see what happens with it.
Server Error in '/' Application.
Year, Month, and Day parameters describe an un-representable DateTime.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
Source Error:
Line 134:
Line 135: <div class="main-date-panel">
Line 136: @{Html.Telerik().Calendar()
Line 137: .Name("main-calendar")
Line 138: .Value(DateTime.Now)
|
Source File: X\MasterLayout.cshtml Line: 136
Stack Trace:
[ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.] System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day) +9390434 System.DateTime..ctor(Int32 year, Int32 month, Int32 day) +18 Telerik.Web.Mvc.UI.Calendar.BuildMonthView(ICalendarHtmlBuilder renderer) +515 Telerik.Web.Mvc.UI.Calendar.WriteHtml(HtmlTextWriter writer) +301 Telerik.Web.Mvc.UI.ViewComponentBase.Render() +131 Telerik.Web.Mvc.UI.ViewComponentBuilderBase`2.Render() +55 ASP._Page_Views_Shared_MasterLayout_cshtml.Execute() in X\MasterLayout.cshtml:136 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +81 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88 System.Web.WebPages.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) +102 System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +12 System.Web.WebPages.WebPageBase.Write(HelperResult result) +67 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +66 System.Web.WebPages.WebPageBase.PopContext() +262 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +95 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +220 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +303 System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +23 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +177 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343 System.Web.Mvc.Controller.ExecuteCore() +116 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10 System.Web.Mvc.<>c__DisplayClass11.<ProcessRequest>b__10() +65 System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +71 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +44 System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +10 System.Web.Mvc.MvcHttpHandler.VerifyAndProcessRequest(IHttpHandler httpHandler, HttpContextBase httpContext) +29 System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContextBase httpContext) +144 System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContext httpContext) +42 System.Web.Routing.UrlRoutingHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +10 Northwind.Web._Default.Page_Load(Object sender, EventArgs e) in X\Default.aspx.cs:12 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207 |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

For now we're disabling our calendar. The DatePicker component (ours and latest) doesn't seem to have the issue.
I will suggest you track the latest internal builds. Some of the known issue related with the Grid UI component are already fixed in the latest internal builds.
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items


Regards,
Shane