Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript Calendar control

Status
Not open for further replies.

MystiqueOfLife

Programmer
Aug 19, 2006
11
CA
Hello,

Working with Javascript Calendars in the .Net environment and accessing the values returned.

options:
- Javascript Calendar places data into .net control (eg. document.getElementById("ctl00_DefaultContent_ElectronicTransfer1_txtAnimalSaleDate").value = inputArray.year + '-' + inputArray.month + '-' + inputArray.day;), access data via .Net (txtTextBox.Text) ?
- Javascript writes to a cookie, .net accesses cookie to retrieve the data (rather not use cookies)
- use a different Calendar (must be free, must not be a .Net control)

Other options?

Cheers!
 
Maybe you could re-phrase your post into a more structured question. I have no idea what you want, nor what problem you are experiencing.

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Hello,

Thanks for the reply.

I had a case where I had to use a Javascript Calendar / Date Chooser, to select a date, and return it to a .Net TextBox control.

The Date Chooser could not be a .Net control, it had to be the Javascript Calendar.

Here was my solution:

Javascript Calendar places data into .net control

document.getElementById("ctl00_MasterPageContent_UserControl_Control").value = date selected in JavaScript Calendar;)

Javascript returns the value to the .Net control and you can access the data from the .Net control.

I realize this is simple, of course, if you remember that the ID="txtField" becomes ID="ctl00_MasterPageContent_UserControl_Control" when the .Net control render's on the page. :)

P.S. If you are looking for an amazing Date Chooser Control in .Net, the infragistics one is slick and robust.

Cheers! Happy Codding!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top