show separate drop down list for hour and minute in extjs 3.1.1

狂风中的少年 提交于 2019-12-25 10:01:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!