This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How to get value of datetimepicker in javascript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to get value of datetimepicker in javascript?" Watch "How to get value of datetimepicker in javascript?" New topic
Author

How to get value of datetimepicker in javascript?

abi chitnis
Greenhorn

Joined: Feb 13, 2009
Posts: 11
I am using datetimepicker widget in my struts2 applicaion. How do I get the value of date enterd in the javascript. I tried following but it gives me value undefined when I do document.getElementById('documentDate').value.



Thank you,

Abhi
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I'd assume you'd have to use the Dojo JavaScript functions to access Dojo components--I'd try checking the Dojo 0.4 documentation (which still exists, but is a bit tricky to find sometimes).

Here's some starting points:

http://dojotoolkit.org/book/dojo-book-0-4
http://download.dojotoolkit.org/release-0.4.3/
 
jQuery in Action, 2nd edition
 
subject: How to get value of datetimepicker in javascript?
 
Similar Threads
datetimepicker
Readonly attribute for dateTimePicker
datetimepicker in struts2
Struts-2 datetimepicker issue...
Struts 2: datetimepicker tag