How to add charactor 'a' to Mask Input

UI Components for JSF
Post Reply
anuja
Posts: 15
Joined: 30 Jan 2012, 09:12

12 Mar 2012, 07:25

hi
For an input box days i need to mask as "00-Days"
So to achive it i am using the following code

Code: Select all

<p:inputMask mask="99-Days"  id="days" >
		 <p:watermark for="days" value="xx-Days" />
</p:inputMask>
So the output is as follows
__-D_ys

But i require it as follows
as __-Days.

I want to make 'a' compulsary, and not any charactor could be entered in its place,
:( how could i do it ?

Thanks in advanced
Anuja S
PF 3.1.1 / JSF 2.0 / jdk - 1.6 / jboss-6.1.0.Final.
Anuja S.

ekurtoglu
Posts: 29
Joined: 21 Feb 2012, 14:49

12 Mar 2012, 09:34

Looking at the jquery.js, there is no intended way to do it. Try DAYS instead of Days if it is not that big of a problem.

Or maybe someone else knows a way to hack it...
PrimeFaces 3.2, GlassFish 3.1, Mojarra 2.1.3

anuja
Posts: 15
Joined: 30 Jan 2012, 09:12

11 Apr 2012, 07:47

The only hack we could make is change the inputMask.js file in the source code of PF 3.1.1 and rebuilt it.
and instead of 'a' we took it 'q' , the least used alphabet.

Thanks... :)
PF 3.1.1 / JSF 2.0 / jdk - 1.6 / jboss-6.1.0.Final.
Anuja S.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests