Sunday 14 December 2014

Disable af:inputDate Default Message

This blog we will see how to hide the default message of af:inputdate component.
Generally when user will click inside the af:inputDate component then the default hint message will display like the below screen.

Now we will how we will hide this default message. Add the below java script inside the fragment.
<af:resource type="javascript">
    function hideDefaultMsg(event){
        var src = event.getSource();
        src.getPeer().ShouldShowHint =function(){
            return false;   
        }
    }
</af:resource>

After that you can add the af:clientListener inside the af:inputDate component like the below code
<af:inputDate label="Label 1" id="id1" >
    <af:clientListener method="hideDefaultMsg" type="focus"/>
</af:inputDate>
Now you run your page and the default message will not display like the below screen

Thanks...

No comments:

Post a Comment