This content has been marked as final.
Show 2 replies
-
1. Re: Disabling rich:calendar via JavaScript
lanceb185 May 21, 2008 6:28 AM (in response to lanceb185)This solved it:
<h:panelGrid columns="3"> <h:selectBooleanCheckbox value="#{bean.selected}"> <a4j:support event="onchange" reRender="cal"/> </h:selectBooleanCheckbox> <h:selectOneMenu value="#{bean.pattern}"> <a4j:support event="onchange" reRender="cal"/> <f:selectItem itemLabel="dd/MMM/yyyy" itemValue="dd/MMM/yyyy"/> <f:selectItem itemLabel="dd-MM-yy" itemValue="dd-MM-yy"/> </h:selectOneMenu> <rich:calendar id="cal" value="#{bean.date}" popup="true" datePattern="#{bean.pattern}" showApplyButton="false" style="width:200px" disabled='#{bean.selected == true}'/> </h:panelGrid>
- Lance -
2. Re: Disabling rich:calendar via JavaScript
bigbaray Oct 30, 2008 6:44 PM (in response to lanceb185)I might be slow. But I would like to do exactly what you are trying to do with JS only, no call to the bean. I have tried setting disabled in the JS which works fine for IE but in FF it still allows the click on the image to fire. I alos replaced the images but still seem to have a listener attached no matter what image is showing.
Does anyone know how to do this in pure JS?
TIA B.