Masked Input's mask question

UI Components for JSF
Post Reply
toytoytoy
Posts: 6
Joined: 13 Jan 2010, 14:49

05 May 2010, 14:35

Hello there,

Id like to force the user to fill one input field like one of the following masks:
9999-9999-9999
9999-9999
So he could write something like "1234-3210", but he could also write like "1234-6547-7777"
Is that possible somehow?
As i learned, these are not regular expresses, and i have to add the exact amount of the caraters in the mask.
Am i wrong? Or is there some solution for that? (regular expressions would be the best..)

thx
Martin

drakenra
Posts: 22
Joined: 15 Feb 2010, 20:23

06 May 2010, 21:20

Hi. Have you tried mask with "9999-9999?-9999" ?

drakenra
Posts: 22
Joined: 15 Feb 2010, 20:23

06 May 2010, 21:25

I also got a question related to masked input, if anyone could help me with :).

Is it possible to somehow mask the input, so that the user is allowed to input only specific numbers like for example time "HH:mm". Currently I have mask with "99:99", which allows user to input from 0 to 9 but I would like the user to input value between min. 00:00 and max. 23:59.

toytoytoy
Posts: 6
Joined: 13 Jan 2010, 14:49

10 May 2010, 14:23

Thx drakenra, that solved it!
But i have no clue for your problem, im sorry :/

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 50 guests