myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Veena K. Pandit (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TRINIDAD-985) Maximum date on <tr:validateDateTimeRange> is maximum date minus 1
Date Wed, 05 Mar 2008 12:25:40 GMT

    [ https://issues.apache.org/jira/browse/TRINIDAD-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575321#action_12575321
] 

Veena K. Pandit commented on TRINIDAD-985:
------------------------------------------

how do i set the timezone to Daylight Savings(ET) what would the line look
like in trinidad-config.xml

> 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.


Mime
View raw message