Use the following code to create a basic inputEx TimeField.
1 | field = new inputEx.TimeField({ |
2 | parentEl: 'container1', |
3 | value:'15:17:34' |
4 | }); |
5 | var button = inputEx.cn('button', null, null, 'getValue'); |
6 | YAHOO.util.Event.addListener(button, "click",function() { |
7 | alert(field.getValue()); |
8 | }); |
9 | YAHOO.util.Dom.get('container1').appendChild(button); |
view plain | print | ? |
Use the separators attribute from CombineField to change the separator strings.
1 | new inputEx.TimeField({ |
2 | parentEl: 'container2', |
3 | separators: [false,"h","m","s"], |
4 | value:'15:17:34' |
5 | }); |
view plain | print | ? |