Page 1 of 1

calendar problem

Posted: 13 Mar 2011, 08:29
by usamagdy
i'm tring to display the calendar but no thing come up
<h:form prependId="false" >
<h:panelGrid columns="4">

<div>
<p:calendar id="cner9sma4" showOn="button" style="display:inline-block;width:190px;background-color: yellow;" />
<p:calendar id="rr9tys4" mode="inline" />
<p:calendar id="rr9tys4uj"/>

</div>
</h:panelGrid >
</h:form>

i'm working jsf2 +primefaces-2.2.RC2

Re: calendar problem

Posted: 13 Mar 2011, 08:55
by gcameo
<h:panelGrid columns="4">

<div>
<p:calendar id="cner9sma4" showOn="button" style="display:inline-block;width:190px;background-color: yellow;" />
<p:calendar id="rr9tys4" mode="inline" />
<p:calendar id="rr9tys4uj"/>

</div>
</h:panelGrid >
You have only one item in your 4 column grid. Dont know if that is what your intension is.

Also how many calendars are you trying to display, 1 or 3?

Also you dont have a value for the calendar. The documentation says value must be a date so i suppose the component will not try and help you if you dont supply one. declare one in your jsf bean and bind it and lets see if that works first

Re: calendar problem

Posted: 13 Mar 2011, 09:42
by usamagdy
I taked snapshot form my code


<p:calendar id="cner9sma4" showOn="button" style="display:inline-block;width:190px;background-color: yellow;" disabled="#{customer.disabled}" value="#{customer.mainCust.contactIDDocIssueDate}" />


private java.util.Date contactIDDocIssueDate;

public java.util.Date getContactIDDocIssueDate() {
return contactIDDocIssueDate;
}

public void setContactIDDocIssueDate(java.util.Date contactIDDocIssueDate) {
this.contactIDDocIssueDate = contactIDDocIssueDate;
}

Re: calendar problem

Posted: 13 Mar 2011, 09:44
by usamagdy
i want to display any of them

Re: calendar problem

Posted: 13 Mar 2011, 10:38
by gcameo
private java.util.Date contactIDDocIssueDate;
is it possible that this is null

use and lets see if that works

Code: Select all

    @PostConstruct
    public void init()
    {
        contactIDDocIssueDate= new Date();
    }

Re: calendar problem

Posted: 13 Mar 2011, 11:01
by usamagdy
thanks i found the problem
the problem was in skin.css