PDA

View Full Version : Need to show hours as 07:00, 15:00, 23:00 (8 hrs increment) in timefield



ashokram
12 Feb 2015, 5:21 AM
I need to show hours as 07:00, 15:00, 23:00 (8 hrs increment) in timefield, but when I used the following code, it is not giving the desired output, can some one help me, if I am missing something.



Ext.create('Ext.form.Panel', {
title: 'Time Card',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
xtype: 'timefield',
name: 'in',
fieldLabel: 'Time In',
format : 'H:i',
minValue: '07:00',
maxValue: '23:00',
increment: 480,
anchor: '100%'
}]
});


Thanks in Advance.

ashokram
12 Feb 2015, 9:47 PM
Here's the solution from SO, if anyone in need.

http://stackoverflow.com/questions/28461949/need-to-show-hours-as-0700-1500-2300-8-hrs-increment-in-extjs-timefield

joel.watson
15 Feb 2015, 8:48 PM
Here's the solution from SO, if anyone in need.

http://stackoverflow.com/questions/28461949/need-to-show-hours-as-0700-1500-2300-8-hrs-increment-in-extjs-timefield

Glad you found a solution, and thanks for sharing the link.

Thanks
Joel