Ajax CalendarExtender script error

Discussion in 'ASP .Net Web Controls' started by Gary Dunne, Feb 4, 2008.

  1. Gary Dunne

    Gary Dunne Guest

    I have an ASP .Net 2.0 page using a calendar extender control. On my dev
    server everything works fine, however on the live server I receive the
    following script error.

    Line 1163: Object doesn't support this property or method.

    The calendar has it's format set to "dd MMMM yyyy"

    The target control has it's date set from a datatbase value in the page_load
    event. If I comment out the line that sets the value then I don't receive
    the script error and everything works fine. The calendar pops up as expected
    and the selected date is displayed in the target control.

    I have a feeling that the problem lies in the locale settings on the server
    (I think it's hosted in the US although the hosting comapny has not yet come
    back to me to confirm this)

    In an effort to sort this issue I have doe the following:

    Added the following to the config file <globalization
    culture="en-GB"></globalization>
    Set the following values on the script manager
    EnableScriptGlobalization="true" , EnableScriptLocalization="true"

    The calendar code is as follows

    <label>Publish Date</label>
    <asp:TextBox runat="server" ID="txtPubDate" MaxLength="8"
    Width="150px" ></asp:TextBox>

    <ajax:CalendarExtender
    ID="calendarEx"
    runat="server"
    TargetControlID="txtPubDate"
    Format="dd MMMM yyyy"
    >

    </ajax:CalendarExtender>

    I am losing hair at a rapid rate over this ... Has anyone else had this
    problem ?

    Thanks

    Gary
    Gary Dunne, Feb 4, 2008
    #1
    1. Advertising

  2. Gary Dunne

    Gary Dunne Guest

    It's amazing what you spot reading your own posts :) .... before anyone
    points out my idiocacy, I've already removed the MaxLength="8" from
    txtPubDate ..... but it still doesn't work !
    Gary Dunne, Feb 4, 2008
    #2
    1. Advertising

  3. Gary Dunne

    Gary Dunne Guest

    I've found the solution ..... The problem is down to the Ajax installation.
    There are two versions of Ajax 1.0 !!!!

    Check out the following url for the complete solution.

    http://forums.asp.net/t/1068191.aspx?PageIndex=2

    Gary



    "Gary Dunne" <> wrote in message
    news:...
    >I have an ASP .Net 2.0 page using a calendar extender control. On my dev
    >server everything works fine, however on the live server I receive the
    >following script error.
    >
    > Line 1163: Object doesn't support this property or method.
    >
    > The calendar has it's format set to "dd MMMM yyyy"
    >
    > The target control has it's date set from a datatbase value in the
    > page_load event. If I comment out the line that sets the value then I
    > don't receive the script error and everything works fine. The calendar
    > pops up as expected and the selected date is displayed in the target
    > control.
    >
    > I have a feeling that the problem lies in the locale settings on the
    > server (I think it's hosted in the US although the hosting comapny has not
    > yet come back to me to confirm this)
    >
    > In an effort to sort this issue I have doe the following:
    >
    > Added the following to the config file <globalization
    > culture="en-GB"></globalization>
    > Set the following values on the script manager
    > EnableScriptGlobalization="true" , EnableScriptLocalization="true"
    >
    > The calendar code is as follows
    >
    > <label>Publish Date</label>
    > <asp:TextBox runat="server" ID="txtPubDate" MaxLength="8"
    > Width="150px" ></asp:TextBox>
    >
    > <ajax:CalendarExtender
    > ID="calendarEx"
    > runat="server"
    > TargetControlID="txtPubDate"
    > Format="dd MMMM yyyy"
    > >

    > </ajax:CalendarExtender>
    >
    > I am losing hair at a rapid rate over this ... Has anyone else had this
    > problem ?
    >
    > Thanks
    >
    > Gary
    Gary Dunne, Feb 4, 2008
    #3
  4. Gary Dunne

    Sachin S Guest

    I am also facing same problem. In my application screen there are more
    than 12 dates, I am retrieving dates from database and setting those
    date to Date textbox as follows

    textbox.Text = obj.date1;

    After setting this date, the Ajax popup calendar doesn't pop up.

    Please provide the solution for the same.




    *** Sent via Developersdex http://www.developersdex.com ***
    Sachin S, Dec 23, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HockeyFan

    CalendarExtender default date?

    HockeyFan, Jun 13, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    973
    HockeyFan
    Jun 13, 2007
  2. smnbss

    CalendarExtender Safari

    smnbss, Aug 31, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    395
    smnbss
    Aug 31, 2007
  3. Replies:
    4
    Views:
    7,733
    sindhoor
    Oct 7, 2009
  4. Greg Peters
    Replies:
    0
    Views:
    310
    Greg Peters
    Apr 29, 2008
  5. Carlos
    Replies:
    2
    Views:
    2,971
    Carlos
    Oct 15, 2009
Loading...

Share This Page