FIX: Clicking the date header in week view results in a server-side exception

2 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1570 posts
    Member since:
    Oct 2004

    Posted 25 May 2010 Link to this post

    The exception is "FormatException: String was not recognized as a valid DateTime"

    The issue is fixed in build 2010.1.526 and later. A workaround is to include the following script below the ScriptManager/RadScriptManager instance on the page:

    <script type="text/javascript">
    Telerik.Web.UI.RadScheduler.prototype._onDateHeaderClick = function (e)
        var date = new Date();
        // Date headers have an href in the format #yyyy-MM-dd
        var dateMatch = e.eventMapTarget.href.match(/#(\d{4}-\d{2}-\d{2})/);
        if (dateMatch && dateMatch.length == 2)
            var parts = $telerik.$.map(dateMatch[1].split("-"), function (part) { return parseInt(part, 10); });
            date = new Date(parts[0], parts[1] - 1, parts[2]);
        return this._switchToSelectedDay(date);
  2. pucsoftware
    pucsoftware avatar
    24 posts
    Member since:
    Sep 2006

    Posted 07 Sep 2010 Link to this post

    Thanks for the code and fix. I was getting this error and this solved the issue.
Back to Top