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. Advertisements

  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. Advertisements

  3. Gary Dunne

    Gary Dunne Guest

    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.
     
    Sachin S, Dec 23, 2008
    #4
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.