I am have an issue using the calendar extender and setting the text box's default value (either through code-behind or directly from the HTML designer). I created a new ASP.NET AJAX-Enabled Web Site, added a reference to the AJAXControlToolkit and the
added the following code to the default page:
The first example works fine, I can click on the image, the calendar pops up, I select a specific date and the textbox now has the value. In the second example, I set the text to be a specific date in the HTML Designer (same behavior via code-behind). When I click on the image, I receive a JS exception with line 429 (Error: Object doesn't support this property or method). The offending section of code is the last line of the _getEffectiveVisibleDate function of the calendar js file (return new Date...):
_getEffectiveVisibleDate : function() {
var value = this.get_visibleDate();if (value == null)
value = this.get_selectedDate();if (value == null)
value = this.get_todaysDate();return new Date(value.getFullYear(), value.getMonth(), 1);},
Can anyone help?
BTW: I'm running on Windows XP SP2 and IE7, ASP.NET Ajax 1.0 and the 3/1/07 toolkit release.
I am experiencing the same issue, only the error seems to differ based on the server it is running on. I have a development server which works correctly, but the production server generates the error above (Object doesn't support this property or method;
line 1163). Both servers are windows 2000 server running IIS 5.0.
Also, removing the default date does allow the popup control to function initially, but if I try to select another date after a postback has completed on the page, the error is generated again. So the error is presumably caused by the text being present
in the input box anytime the page is loader.
I am having the exact same problem and it has been working before I am sure !!! or maybe I'm going mad... [:S]
It is very strange indeed...
This javascript is very annoying and the wonderful calendar control only works on my development machine (Vista business x64, IIS 7), not on my staging or prod servers (both Windows 2003 SP 2 Servers, IIS 6.0). I would bet it used to work before... is it
something to do with a Windows update??? W2K3 SP2?
All the machines have AJAX 1.0 and the latest AjaxControlToolKit installed, I also tried to do an iisreset, nothing cures it... arrrrrrrgggghhhh!
I gave up on the AjaxControlToolkit's Calendar Extender...I just couldn't wait any longer.
I found a free control toolkit that does the job for me...eXcentrics World's custom server controls (http://www.eworldui.net/). This is a free download that
includes a calendar popup control. I created a set of skins and styles that mimic the look and feel of the AjaxControlToolkit's Calendar Extender.
As a side note, this control set also includes a collapsable panel which I think is better than the AjaxControlToolkit's.
I gave up on the AjaxControlToolkit's Calendar Extender...I just couldn't wait any longer.
I found a free control toolkit that does the job for me...eXcentrics World's custom server controls (http://www.eworldui.net/). This is a free download that
includes a calendar popup control. I created a set of skins and styles that mimic the look and feel of the AjaxControlToolkit's Calendar Extender.
As a side note, this control set also includes a collapsable panel which I think is better than the AjaxControlToolkit's.
2. Copy the AjaxControlToolkit.dll and .pdb files to your application bin's folder
3. MOST IMPORTANT : Make sure you also copy ALL the folders like "ar", "de", "fr", "en", etc. (including the localisation resource files) to the bin directory of your application. That solved it for me and
the calendar is working again!
Add a new textbox control make sure it does not view it .. DO NOT set to visible to false...
Set the calendar control to this 'invisble' TextBox.
Add a onChange event in this TextBox so that you can move value from this control to the orignal TextBox and make sure you clear the value from 'invisble' TextBox.
jmewustl
0 Points
3 Posts
CalendarExtender - Default Value
Mar 28, 2007 08:34 PM|LINK
I am have an issue using the calendar extender and setting the text box's default value (either through code-behind or directly from the HTML designer). I created a new ASP.NET AJAX-Enabled Web Site, added a reference to the AJAXControlToolkit and the added the following code to the default page:
<div> <asp:TextBox runat="server" ID="txtDate" /> <asp:Image runat="server" ID="btnDate" AlternateText="cal" ImageUrl="http://ajax.asp.net/ajaxtoolkit/Calendar/Calendar_scheduleHS.png" /> <ajaxToolkit:CalendarExtender runat="server" ID="calExtender" PopupButtonID="btnDate" TargetControlID="txtDate" Format="MM/dd/yyyy" /> <br /> <asp:TextBox runat="server" ID="txtDate2" Text="11/01/2006" /> <asp:Image runat="server" ID="btnDate2" AlternateText="cal2" ImageUrl="http://ajax.asp.net/ajaxtoolkit/Calendar/Calendar_scheduleHS.png" /> <ajaxToolkit:CalendarExtender runat="server" ID="CalendarExtender1" PopupButtonID="btnDate2" TargetControlID="txtDate2" Format="MM/dd/yyyy" /> </div>The first example works fine, I can click on the image, the calendar pops up, I select a specific date and the textbox now has the value. In the second example, I set the text to be a specific date in the HTML Designer (same behavior via code-behind). When I click on the image, I receive a JS exception with line 429 (Error: Object doesn't support this property or method). The offending section of code is the last line of the _getEffectiveVisibleDate function of the calendar js file (return new Date...):
_getEffectiveVisibleDate : function() { var value = this.get_visibleDate();if (value == null) value = this.get_selectedDate();if (value == null) value = this.get_todaysDate();return new Date(value.getFullYear(), value.getMonth(), 1);},Can anyone help?
BTW: I'm running on Windows XP SP2 and IE7, ASP.NET Ajax 1.0 and the 3/1/07 toolkit release.
"AJAX Toolkit" "CalendarExtender"
bigslick
Member
2 Points
1 Post
Re: CalendarExtender - Default Value
Apr 09, 2007 01:39 AM|LINK
I am experiencing the same issue, only the error seems to differ based on the server it is running on. I have a development server which works correctly, but the production server generates the error above (Object doesn't support this property or method; line 1163). Both servers are windows 2000 server running IIS 5.0.
Also, removing the default date does allow the popup control to function initially, but if I try to select another date after a postback has completed on the page, the error is generated again. So the error is presumably caused by the text being present in the input box anytime the page is loader.
Any help would be greatly appreciated...
lambi_uk
Member
66 Points
22 Posts
Re: CalendarExtender - Default Value
Apr 27, 2007 06:22 PM|LINK
I am having the exact same problem and it has been working before I am sure !!! or maybe I'm going mad... [:S]
It is very strange indeed...
This javascript is very annoying and the wonderful calendar control only works on my development machine (Vista business x64, IIS 7), not on my staging or prod servers (both Windows 2003 SP 2 Servers, IIS 6.0). I would bet it used to work before... is it something to do with a Windows update??? W2K3 SP2?
All the machines have AJAX 1.0 and the latest AjaxControlToolKit installed, I also tried to do an iisreset, nothing cures it... arrrrrrrgggghhhh!
Please advise!
jmewustl
0 Points
3 Posts
Re: CalendarExtender - Default Value
Apr 27, 2007 06:33 PM|LINK
I gave up on the AjaxControlToolkit's Calendar Extender...I just couldn't wait any longer.
I found a free control toolkit that does the job for me...eXcentrics World's custom server controls (http://www.eworldui.net/). This is a free download that includes a calendar popup control. I created a set of skins and styles that mimic the look and feel of the AjaxControlToolkit's Calendar Extender.
As a side note, this control set also includes a collapsable panel which I think is better than the AjaxControlToolkit's.
--josh
jmewustl
0 Points
3 Posts
Re: CalendarExtender - Default Value
Apr 27, 2007 06:33 PM|LINK
I gave up on the AjaxControlToolkit's Calendar Extender...I just couldn't wait any longer.
I found a free control toolkit that does the job for me...eXcentrics World's custom server controls (http://www.eworldui.net/). This is a free download that includes a calendar popup control. I created a set of skins and styles that mimic the look and feel of the AjaxControlToolkit's Calendar Extender.
As a side note, this control set also includes a collapsable panel which I think is better than the AjaxControlToolkit's.
lambi_uk
Member
66 Points
22 Posts
Re: CalendarExtender - Default Value
May 07, 2007 12:05 PM|LINK
I think I have found the problem [:)]
1. Download the latest AjaxControlToolkit (v 10301) from: http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx?ReleaseId=1425
2. Copy the AjaxControlToolkit.dll and .pdb files to your application bin's folder
3. MOST IMPORTANT : Make sure you also copy ALL the folders like "ar", "de", "fr", "en", etc. (including the localisation resource files) to the bin directory of your application. That solved it for me and the calendar is working again!
Hope this helps.
rajaron
Member
657 Points
202 Posts
Re: CalendarExtender - Default Value
Apr 22, 2008 12:17 PM|LINK
There is a tweak to resolve the issue.
Add a new textbox control make sure it does not view it .. DO NOT set to visible to false...
Set the calendar control to this 'invisble' TextBox.
Add a onChange event in this TextBox so that you can move value from this control to the orignal TextBox and make sure you clear the value from 'invisble' TextBox.
This will resolve the issue.
raddrick
Member
10 Points
13 Posts
Re: CalendarExtender - Default Value
May 13, 2008 03:39 PM|LINK
ceExistingCriticalDate.SelectedDate.Value;
im using this control in a modal popup....and im not having a great time doing so...neither the textbox or the extender have any values...System Developer