Rank: Newbie Groups: Member
Joined: 10/24/2007 Posts: 2
|
Hi,
I am trying to add a calendar to all date fields (asp:textbox) on an existing site. I have many text boxes and validation controls and do not want to change any existing code, i just want to add a calendar icon which can popup the calendar control. On selecting a date i want to fill my textbox with the date selected.
Obviously the date picker seems the best control but this will mean i have to change a lot of code and re-test all the custom validation so i really want to use the popup calendar control. How can i make this control fill the textbox (client side) when i select a date? I have tried using the ClientSideOnSelect event but cant seem to make it pass a parameter (the textbox to fill id).
Any ideas?
Thanks, Rich
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Rich,
You are on the right track. You don't pass a parameter through the popup calendar, you just save the ID of the textbox in a global variable before calling our popup calendar, then in ClientSideOnSelect use that global variable to decide which text box to fill.
Thanks
|
Rank: Newbie Groups: Member
Joined: 10/24/2007 Posts: 2
|
Thanks for your quick reply, worked a treat..
Rich
|