Hi there, I need some help with building a date picker popup calendar standard control in my formview control. I have a formview control in insert template mode. One of the text boxes (ID: DespatchDateTextBox0) control is bound to date field in the database, that I would like users to fill in using calendar control. I have attached the code behind for insert template, highlighting the date text box I want the calendar to use as an output. I am new to asp.net, have been searching on the net for help with this. There are a number of examples using java script for pop up calendar but I am slightly unsure how do I insert this code in the code behind page built in using vb as scripting language. I am using vwd express 08. Hope this is making sense, let me know if I have left anything out.
Thanks, gsrai31
The Calendar control is something of a burden... it is a server-side control and because of this, using it in your form can be quite tedious - the user will need to click and wait for a postback to occur every time she clicks something.
The reason you see so many javascript examples out there is because it's easier to use.
Most javascript calendar controls will require you to add one .js file to your page and when you call the calendar, it's a matter of passing the ID of the textbox (DespatchDateTextBox) to the function for the calendar. The javascript calendar uses this ID when it is writing the value back after the user has selected what she needs.
Start by choosing the calendar you want. You can do a search. Here are just a few examples
They also come with instructions. Post back and ask if you are having difficulty with the instructions.
Taking the third link as an example, you would have a little image next to the textbox and you'd add some javascript to that image. You'd have to do it from the codebehind like this