How to compare two dates in validation.xml?

Nalini <[email protected]> Thu, 07 Dec 2006 02:29:45 CST
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <11567100.1165480570724.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
Hi,
      I am using datepickers(<ww:datepicker/> ) in my form to store fromDate and toDate. Before submiting the form I need to validate the dates i.e., toDate should be greater than fromDate. 
 
This is how the validation.xml file looks.But its not working.

<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
	<validator type="expression">
		<param name="expression">
		   	datelasteditedto.compareTo(datelasteditedfrom)>0
		</param>
		<message>Error</message>
	</validator>
</validators>

Can anyone help me to solve this problem.

Thanks,
Nalini
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=52363&messageID=105670#105670

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