[ https://issues.apache.org/jira/browse/TRINIDAD-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575139#action_12575139 ]
Yee-Wah Lee commented on TRINIDAD-985: -------------------------------------- 1) This demo seems to work: http://www.irian.at/trinidad-demo/faces/convertValidate/convertValidate.jspx Look for the example with "min=2004-11-16 max=2004-12-16" , type 2004-12-16 and Submit without errors. 2) Strangely this demo fails, which does similar things: http://www.irian.at/trinidad-demo/faces/convertValidate/clientConvert.jspx Look for the inputDate with instruction " examples of values that will fail validation: any date which is not in 2007". And type in "12/31/2007", then Submit - error is returned on the server. I initially thought this was related to https://issues.apache.org/jira/browse/TRINIDAD-61, but that fix seems to be active because the error message states the maximum should be "12-31-2007", it used to be "12-30-2007". > Maximum date on <tr:validateDateTimeRange> is maximum date minus 1 > ------------------------------------------------------------------ > > Key: TRINIDAD-985 > URL: https://issues.apache.org/jira/browse/TRINIDAD-985 > Project: MyFaces Trinidad > Issue Type: Bug > Components: Components > Environment: windows xp professional; IE 6.0; Myfaces 1.1.5;Trinidad > 1.1.4 > Reporter: Veena K. Pandit > > When I set a maximum date in <tr:inputDate> associated with a > <tr:validateDateTimeRange> date component, the date component reflects the > maximum date to be maximum date minus 1 > date.jspx looks like this > <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2" > xmlns:f="http://java.sun.com/jsf/core" > xmlns:tr="http://myfaces.apache.org/trinidad" > xmlns:trh="http://myfaces.apache.org/trinidad/html"> > <jsp:directive.page contentType="text/html;charset=utf-8"/> > <f:view> > <tr:messages/> > <tr:document title="Date Component"> > <tr:form> > <tr:panelHorizontalLayout> > <tr:inputDate id="date" autoSubmit="true" > value="#{myDateBacking.dateValue}" > label="Effective Date:"> > <tr:convertDateTime pattern="yyyy-MM-dd"/> > <tr:validateDateTimeRange minimum="#{myDateBacking.minDate}" > maximum="#{myDateBacking.maxDate}" > messageDetailNotInRange="Date {0} in {1} > does not fall within {2} : {3}"/> > </tr:inputDate> > </tr:panelHorizontalLayout> > </tr:form> > </tr:document> > </f:view> > </jsp:root> > MyDateBacking.java looks like this: > package mil.osd.dmdc.deers.demo.backing; > import java.util.Calendar; > import java.util.Date; > import java.util.GregorianCalendar; > public class MyDateBacking { > > > private Date _dateValue; > private Date _minDate; > private Date _maxDate; > > > public MyDateBacking(){ > _dateValue = new Date(); > Calendar xmas = new GregorianCalendar(1998, Calendar.DECEMBER, 25); > _minDate = xmas.getTime(); > Calendar future = new GregorianCalendar(2008,Calendar.MARCH,30); > _maxDate = future.getTime(); > > } > public void setDateValue(Date dateValue) { > this._dateValue = dateValue; > } > public Date getDateValue() { > return _dateValue; > } > public void setMinDate(Date minDate) { > this._minDate = minDate; > } > public Date getMinDate() { > return _minDate; > } > public void setMaxDate(Date maxDate) { > this._maxDate = maxDate; > } > public Date getMaxDate() { > return _maxDate; > } > } > The example shows the maximum date is set to March 30,2008, but the calendar > reflects > the maximum date to be March 29, 2008 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.