Ajax CalendarExtender script error

G

Gary Dunne

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
 
G

Gary Dunne

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 !
 
S

Sachin S

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top