问题
I am working on an extjs 3.1.1 application. Now I have a timefield that user select time from that and save this time but this timefield drop down list is very long and hard to find desired time. so I want to put separate drop down lists for hour and minute. can anyone please help me?
回答1:
here is my code which i am using for date and time field.you can define format of time .
i>for date:
new Ext.form.DateField({
id : 'scheduleDate',
fieldLabel : 'Date',
format : 'd-M-Y',
editable:false,
minValue : new Date(),
allowBlank : false
})
ii>for time:
new Ext.form.TimeField({
id : 'scheduleTime',
fieldLabel : 'Time',
allowBlank : false,
editable:false,
format : 'H:i',
increment: 1
})
来源:https://stackoverflow.com/questions/18673147/show-separate-drop-down-list-for-hour-and-minute-in-extjs-3-1-1