[ https://issues.apache.org/jira/browse/TRINIDAD-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575198#action_12575198 ]
Yee-Wah Lee commented on TRINIDAD-985: -------------------------------------- Strange. I cannot get the issue to reproduce on trinidad trunk, using both extremes for timezones in trinidad-config.xml. This one for UTC+12 <time-zone>Pacific/Nauru</time-zone> This one for UTC-11 <time-zone>Pacific/Pago_Pago</time-zone> Veena, could you try the following: i) Set the timezone parameter in your trinidad-config.xml ii) In your backing bean, max out the time components, i.e. future.set (Calendar.HOUR_OF_DAY, 23); future.set (Calendar.MINUTE, 59); future.set (Calendar.SECOND, 59); future.set (Calendar.MILLISECOND, 999); > 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.