Use the following code to create a basic inputEx DateTimeField.
// Example 1
field = new Y.inputEx.DateTimeField({parentEl: 'container1', value: new Date()});
var button = inputEx.cn('button', null, null, 'getValue');
Y.one(button).on('click',function() {
alert(field.getValue());
});
Y.one('#container1').appendChild(button);
Change the date format
new Y.inputEx.DateTimeField({parentEl: 'container2', value: new Date(), dateFormat: 'd/m/Y'});