-
1. Re: Disabling 'clean' button in rich:calendar
hwoarang Oct 7, 2010 4:38 PM (in response to lanceb185)For different reasons I need to hide/remove this buttom too.
Someone can give us a help?
Or... how can I use the Calendar's JS API Function resetSelectedDate() to intercept the onclean event?
Waiting for https://jira.jboss.org/browse/RF-7794
Thank you.
-
2. Re: Disabling 'clean' button in rich:calendar
hwoarang Oct 7, 2010 5:10 PM (in response to lanceb185)Found!
To disable/hide the 'clean' button just remove the control 'cleanControl' from the footer facet... Look the code below.
<r:calendar id="calendarID"> <f:facet name="footer"> <h:panelGrid columns="4"> <h:outputText value="{todayControl}" /> <h:outputText value="{selectedDateControl}" /> <h:outputText value="{timeControl}" /> <h:outputLabel value="{cleanControl}" onclick="$('#form\\:calendarID').component.resetSelectedDate()" /> </h:panelGrid> </f:facet> </r:calendar>
The onclick event above resolves the problem that when we hit the 'clean' buttom, the component's value still set. Now I can really clean my calendar.
Hope this helps someone else.
-
3. Re: Disabling 'clean' button in rich:calendar
tchagan Nov 18, 2010 8:23 AM (in response to hwoarang)Hi, thanks for the code, a bit of modification to it and it solves my problem. I don't want the user to be able to see or use the 'clean' button, here's how :
<r:calendar id="calendarID">
<f:facet name="footer">
<h:panelGrid columns="1">
<h:outputText value="{selectedDateControl}" />
</h:panelGrid>
</f:facet>
</r:calendar>The only value left in the footer of the calendar control is the selected date.
cheers!