[richfaces-issues] [JBoss JIRA] (RF-12417) Control style for past date for rich:calendar yield different look in FF vs Chrome

Thang Pham (JIRA) jira-events at lists.jboss.org
Mon Aug 13 10:20:14 EDT 2012


    [ https://issues.jboss.org/browse/RF-12417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711226#comment-12711226 ] 

Thang Pham commented on RF-12417:
---------------------------------

I have a requirements that the client cannot select past date on the calendar. So I try something like this

 

This is my javascript

 

function disablePastDate(day){
    var curDate = new Date();
    if(day.date.getTime() - curDate.getTime() > 0) return true;
    else return false;    
}


function disablePastDateStyle(day){    
    var curDate = new Date();
    var style = '';
    if(day.date.getTime() - curDate.getTime() < 0) style = 'pastDate';
    return style;
}

 

This is my css

 

.pastDate{

    background-color: gray;

}

 

and my calendar look as follow

 

 

<rich:calendar dayDisableFunction="disablePastDate"
               dayClassFunction="disablePastDateStyle"
               id="calendarOnce" />

 

1. So the behavior, I got is that I cannot select the past date. This is great, but the style of the past date appear correctly in firefox but not in chrome. In Firefox you can see the backgound is gray on the past date, but not in chrome? Is this a bug?

 

2. From the screen shot in FF, you can see that the first 3 dates 29, 30, 31 is not backgound-color: gray. Is this a bug?


FF 14, and Chrome 21.0.1180.75

Screen shots include inside community post: https://community.jboss.org/thread/203872?tstart=0
                
> Control style for past date for rich:calendar yield different look in FF vs Chrome
> ----------------------------------------------------------------------------------
>
>                 Key: RF-12417
>                 URL: https://issues.jboss.org/browse/RF-12417
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.2.2.Final
>            Reporter: Thang Pham
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list