I am using JSF,Primefaces.
I have a search Criteria Functionality in my App, there i am facing a problem with calendar date
.
I am using this piece of code for my application.
<p:calendar id="Date" value="#{bean.fromDate}" pattern="MM/dd/yyyy" showOn="button"/>
I faced this sort of issue that it is accepting even i had given the date 214/03/2013
as and then converting it into 10/03/2030
and performing the action!
But,What exactly i need to do is either to display a message
or else to mask
that input field as 99/99/9999.
In my scenario i should not use readonlyInput="true"
because i may or may not give a date.
If i am using that then i am unable to clear the field back to empty,because i am in use with @SessionScoped.