miércoles, 9 de mayo de 2012

ExtJS 4: Test time picker

Ext.create('Ext.form.Panel', {
    title: 'Time Card',
    width: 300,
    bodyPadding: 10,
    renderTo: Ext.getBody(),
    items: [{
        xtype: 'timefield',
        id: 'mytimefieldId',
        name: 'in',
        fieldLabel: 'Time In',
        minValue: '00:00 AM',
        maxValue: '11:59 PM',
        increment: 30,
        submitFormat : 'H:i',
        //format: 'H:i',
        value: new Date(),
        anchor: '80%'
    }]
});

Ext.getCmp('mytimefieldId').setValue(new Date())
console.log(Ext.getCmp('mytimefieldId').getSubmitValue())
//console.log(Ext.getCmp('mytimefieldId').value)    


Test Online
http://jsfiddle.net/JAAx7/2/

1 comentario: