[SOLVED] TimePicker: How to realize an editmask ?
I need an editmask like "__:__" in TimePicker component. Is that possible?
Last edited by RueKow on 08 Jul 2014, 13:26, edited 1 time in total.
Rüdiger
PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14
PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14
I have found a solution with a small jQuery plugin called "Masked Input Plugin". You can find it here:
http://digitalbush.com/projects/masked-input-plugin
This is working fine for me:
http://digitalbush.com/projects/masked-input-plugin
This is working fine for me:
Code: Select all
<h:head>
<h:outputScript name="jquery.maskedinput.js" />
</h:head>
Code: Select all
<h:outputScript>
jQuery(function($){
$.mask.definitions['H']='[0-2]';
$.mask.definitions['M']='[0-5]';
$('[id="tpID1_input"]').mask('H9:M9');
});
</h:outputScript>
<pe:timePicker id="tpID1" value="#{myBean.time}"
mode="popup" locale="de" showOn="button" style="width:40px" showCloseButton="true"
required="true" requiredMessage="Bitte geben Sie eine Uhrzeit ein." />
Rüdiger
PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14
PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests