Wednesday, 25 December 2013

af:inputDate disabling the input through keyboard


The below code will use to disabling the keyboard input on af:inputDate


<f:view>

        <af:document title="PanelBoxDemo.jspx" id="d1" binding="#{backingBeanScope.backing_PanelBoxDemo.d1}">

        <af:resource type="javascript">

       function disableDatePicker(evt){

        evt.cancel();

       }

     </af:resource>

            <af:form id="f1" binding="#{backingBeanScope.backing_PanelBoxDemo.f1}">

                <af:inputDate label="Label 1" id="id1" binding="#{backingBeanScope.backing_PanelBoxDemo.id1}">

                    <af:clientListener method="disableDatePicker" type="keyDown"/>

                </af:inputDate>

            </af:form>

        </af:document>
    </f:view>

Thanks..

No comments:

Post a Comment