CalendarExtender and the Dreaded Line 1162 bug

Last post 04-14-2007 2:04 AM by laron. 3 replies.

Sort Posts:

  • CalendarExtender and the Dreaded Line 1162 bug

    02-28-2007, 4:49 PM
    • Member
      5 point Member
    • Zak Keown
    • Member since 02-28-2007, 9:28 PM
    • Posts 26

    I've trolled all over the forums but haven't found a fix that works for me, so here's my exact scenario...

    I have a DetailsView.  One of the fields is called DueDate, and I have converted this to a template field and attached a CalendarExtender to the TextBox.  When the page loads, the due date for the current project is pulled from a database and plugged into the textbox.  This worked beautifully on my local server and I was ecstatic with my (read: the MS AJAX developers') brilliance.  I put on my finishing touches and copy/paste the code straight over to the production server.  All looks OK, page loads.  EXCEPT... there's a little javascript error in the bottom corner:

    Line: 1163

    Char: 13

    Error: Object doesn't support this property or method

    Code: 0

     

    Crap.  Pull it up in Firefox and use my handy dandy Web Developer toolbar to get more info.

     
    Error: Date.parseLocale is not a function
    Source File: http://xxx.xxx.xxx.xxx/ScriptResource.axd?d=H1plF88Eb1RACKFfFak5ALpv7JjYVTESGuk-5KWkb9JcDSYU2Ya0Ay5Pg8NtTzGs1823rn4oK_7pZhGmrtbR3_vXmi-z0DqqrnCoVXw9CBk1&t=633052264287082267
    Line: 1162

    OK, better hit the forums... here's the solutions I found:

    1) Run iisreset = No help

    2) Run aspnet_regiis -i  = No help

    3) I saw a third solution of using the javascript source of the control toolkit and fixing the error (apparently it's date.parse or something?) but honestly don't have enough faith in my javascript skills to pull that off without more instruction.

    Can anyone either elaborate on #3 or give me some other idea for fixing this?  I would greatly appreciate it.
     

  • Re: CalendarExtender and the Dreaded Line 1162 bug

    03-06-2007, 4:56 PM
    • Member
      44 point Member
    • dPalfery
    • Member since 11-28-2005, 6:36 AM
    • Milwaukee WI
    • Posts 8
    I am also experiencing the same problem but only on my production boxes. On the our Test server and development machines no error. I checked the versions of the ajax dll and they are the same. Any ideas would be great.
  • Re: CalendarExtender and the Dreaded Line 1162 bug

    03-06-2007, 5:08 PM
    Answer
    • Member
      44 point Member
    • dPalfery
    • Member since 11-28-2005, 6:36 AM
    • Milwaukee WI
    • Posts 8

    Ok, Here is the fix to my problem, I hope it works for you as well.

    If you look in Add and Remove Programs you may notice that the Microsoft ASP.NET 2.0 AJAX Extensions 1.0 has a size of 1.23MB. If this is the case then you actually have a beta or CTP version of the AJAX Extensions. Uninstall this version and download the new file from the asp.net website. After it installs it's size will be 1.75MB

     

    Hope this helps

  • Re: CalendarExtender and the Dreaded Line 1162 bug

    04-14-2007, 2:04 AM
    • Member
      6 point Member
    • laron
    • Member since 04-13-2007, 11:24 PM
    • Posts 3

    Hi,I'm laron,from China,I have the same problems like you,and I get it.You Could Change that code like this:

     if(text)
    {
        try
        {
            value = Date.parseLocale(text, this.get_format());
        }
        catch (e)
        {
            value = Date.parse(text, this.get_format());
        }
    }

    change the source for AJAX toolkit and recompiled it with changed values,I'v tried,and it's OK!

Page 1 of 1 (4 items)