inputEx - TimeField Usage

Basic TimeField creation

Use the following code to create a basic inputEx TimeField.

field = new YAHOO.inputEx.TimeField({parentEl: 'container1', showMsg: true, value:'15:17:34'}); var button = YAHOO.inputEx.cn('button', null, null, 'getValue'); YAHOO.util.Event.addListener(button, "click",function() { alert(field.getValue()); }); YAHOO.util.Dom.get('container1').appendChild(button);

Change separators

Use the separators attribute from CombineField to change the separator strings.

new YAHOO.inputEx.TimeField({ parentEl: 'container2', separators: [false,"h","m","s"], value:'15:17:34' });