Welcome Guest Search | Active Topics | Sign In | Register

Popup Calendar fill text box Options
Yellowbus
Posted: Wednesday, October 24, 2007 5:16:15 AM
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
eo_support
Posted: Wednesday, October 24, 2007 7:11:17 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
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
Yellowbus
Posted: Thursday, October 25, 2007 3:46:03 AM
Rank: Newbie
Groups: Member

Joined: 10/24/2007
Posts: 2
Thanks for your quick reply, worked a treat..

Rich


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.