0 Replies Latest reply on Sep 12, 2011 5:14 AM by srd.pl

    Problems with rich:calendar

    srd.pl

      I have problems with using the calendar tag from richfaces framework. On my page I have two calendars to select date range (to and from). However they don't seem to work properly. I have the following problems:

      1. When I click on the 'pop-up' icon the calender shows and when I pick the date it closes. However when I try to click on it again nothing happens. Sth Like a 'one time opener'...
      2. When I select the date, the month is always 00 (in the browser) and in Java bean code it's January (01).
      3. Is it possible to initialize the two calender dates to cover the range of 'last month'? Could anyone provide me with a example code snippet for that?

      Here is my jsp code:

                       
      <td>
                          
      <rich:calendar value="#{welcomeBean.dateFrom}"
                         
      
      
      popup="true" datePattern="yyyy/mm/dd"
                         
      
      
      showApplyButton="false" cellWidth="24px" cellHeight="22px" style="width:200px" showInput="true"/>
                       
      </td>               
      
                       
      <td>
                          
      <rich:calendar value="#{welcomeBean.dateTo}"
                         
      
      
      popup="true" datePattern="yyyy/mm/dd"
                         
      
      
      showApplyButton="false" cellWidth="24px" cellHeight="22px" style="width:200px" showInput="true"/>
                       
      </td>
                       
      <td>
                        
      <h:commandButton value="Update"  action="#{welcomeBean.update}"/>
      
      
      
      
      
       </td>   
      
      

       

      I use JSF 2 and Tomcat 6