I use two timefields. One is the starttime and the other the endtime. When i select a time in the starttime i load this value into the endtime:
{
xtype: 'timefield',
flex: 1,
margins: '10',
maxHeight: 25,
maxWidth: 100,
fieldLabel: '',
labelAlign: 'top',
name: 'startTijd',
allowBlank: false,
altFormats: 'G:i',
format: 'G:i',
listeners: {
change: {
fn: me.onTimefieldChange,
scope: me
}
}
}
This is the function for the listener
onTimefieldChange: function (field, newValue, oldValue, eOpts) {
Ext.getCmp('eindTijd').setValue(newValue);
}
But what i want is that when i select starttime = 14:00 the endtime will automaticly increase it with one step for the endtime in this case 14:15. I tried to add 15 to the newValue but that will add 15 to the GMT