-
18 Aug 2012 1:38 AM #1
maxValue of Timefield less then minValue?
maxValue of Timefield less then minValue?
Hello!
I have the following code:
How can I make maxValue = 2:00 AM to choose the time from 9:00 AM to 2:00 AM?Code:header: 'title', dataIndex: 'Time', field: { xtype: 'timefield', allowBlank: false, format: 'H:i', minValue:'9:00 AM', maxValue:'24:00 PM' }, width: 100, renderer: new Ext.util.Format.timefieldRenderer('H:i')
Thanks.
-
18 Aug 2012 1:48 AM #2
Hi!
i guess, you may not specify lesser value in maxValue.
try This, it will helps you:-
Output:-Code:{ xtype: 'timefield', fieldLabel: 'Time In', format: 'H:i', minValue: '02:00', maxValue: '09:00', increment: 30, anchor: '100%' }
timefield.png
also, If you need 'AM' in your timefield, you may use following:-
Code:{ xtype: 'timefield', fieldLabel: 'Time In', minValue: '2:00 AM', maxValue: '9:00 AM', increment: 30, anchor: '100%' }sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
18 Aug 2012 2:07 AM #3
Thanks, but I need the following range: 9:00, 10:00, 11:00, 12:00, 13:00, ....22:00, 23:00, 24:00(or 00:00), 01:00, 02:00.. Is it really impossible?
Does anyone know?
-
19 Aug 2012 3:08 PM #4
By Default 2AM < 9AM .. as it is the next day if you go past midnight. You may be able to override the population of the list.
The alternative could be to just create your own combo and populate it as needed.
Scott.
-
19 Aug 2012 8:46 PM #5
Yeah! Simply the best, in this case. Thank you!



Reply With Quote