AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
Go Back  Xtreme Visual Basic Talk > > > AjaxControlToolkit.CalendarExtender


Reply
 
Thread Tools Display Modes
  #1  
Old 06-21-2013, 11:00 AM
Roger-U Roger-U is offline
Centurion
 
Join Date: Apr 2008
Location: Surrey, UK
Posts: 108
Default AjaxControlToolkit.CalendarExtender


Dim cal1 As New AjaxControlToolkit.CalendarExtender
cal1.TargetControlID = "txt3"
Me.Controls.Add(cal1)

but i want (need) to add the <inputs etc as dynamic html such as

litHtml.text = "<input id=""txt3"" />"

This compiles and looks good... but at run time it errors with the calendar control script complaining that element 'txt3' does not exist.

It does, in that document.getelementById("txt3") works, but i guess the CalendarExtender is looking elsewhere for it.

Does anyone know if it is possible to associate the Calendar Extender with a dynamically generated input box?
Reply With Quote
  #2  
Old 06-21-2013, 05:04 PM
PlausiblyDamp's Avatar
PlausiblyDampAjaxControlToolkit.CalendarExtender PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,054
Default

Never tried doing it dynamically with the Ajax control toolkit, however if you are willing to consider switching to jQueryUI instead then this becomes pretty trivial as you just need to make sure the html element has a specific css class (of your choosing) and it will just work.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 06-23-2013, 03:12 AM
Roger-U Roger-U is offline
Centurion
 
Join Date: Apr 2008
Location: Surrey, UK
Posts: 108
Default

Thanks for the suggestion, but my client wanted to stick with the Ajax one because they already use it... even if they do complain it doesn't alwyas work reliably!

I did get it going, but it is SUCH A PAIN.. i will have to do some arm bending...!

I did look quickly at http://jqueryui.com/datepicker/ looks like the standard .net webcontrol ... and the immediate issue there is there is no obvious way of going back say 50+ years (except clicking the << button 50 times)... I suspect it is hidden in the documentation somewhere
Reply With Quote
  #4  
Old 06-23-2013, 04:04 AM
PlausiblyDamp's Avatar
PlausiblyDampAjaxControlToolkit.CalendarExtender PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,054
Default

http://jqueryui.com/datepicker/#dropdown-month-year and http://api.jqueryui.com/datepicker/#option-changeYear

Trust me if you are doing a lot of dynamic HTML generation the jQueryUI stuff is a lot easier to work with compared with the AjaxControlToolkit
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags

Last edited by PlausiblyDamp; 06-23-2013 at 04:12 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
 
AjaxControlToolkit.CalendarExtender
AjaxControlToolkit.CalendarExtender
 
-->