Re: datepicker

lucy <[email protected]> Thu, 07 Dec 2006 13:42:48 CST
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <26873579.1165520697136.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
I added this line in the calendar-setup.js, after setting the params and verify if is a inputField or diplayArea or button:
[code]
if(params.inputField) {
   var date = new Date();
   if(params.inputField.value == "" ){
			params.inputField.value = (date.getMonth() + 1) + "/" + (date.getDate()<10?"0"+date.getDate():date.getDate()) + "/" + date.getFullYear();
		}
	}
	
[/code]

So, now when I enter in this page the current date is in the textfield, if I modify and generate the report, it returns with date that user entered.
Terrible javascript, I'm not so good on that... hehehe. If anyone has a better solution, I'll be grateful.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=41685&messageID=105835#105835

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]