inputEx - DatePickerField Usage

Basic DatePickerField creation

Use the following code to create a basic inputEx DatePickerField.

new YAHOO.inputEx.DatePickerField({parentEl: 'container1', value: new Date()});

Change DatePickerField date format

Use the following code to select another date format

new YAHOO.inputEx.DatePickerField({parentEl: 'container2', value: new Date(1984,0,6), dateFormat: 'd/m/Y'});

DatePickerField Updated event

Listening for the updatedEvt

var dp = new YAHOO.inputEx.DatePickerField({parentEl: 'container3', value: new Date(), dateFormat: 'd/m/Y'}); dp.updatedEvt.subscribe( function(e,params) { var value = params[0]; YAHOO.util.Dom.get('container3').appendChild( YAHOO.inputEx.cn('div',null,null, value) ); });