在extjs 3.1.1中显示小时和分钟的单独下拉列表 [英] show separate drop down list for hour and minute in extjs 3.1.1

查看:84
本文介绍了在extjs 3.1.1中显示小时和分钟的单独下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究extjs 3.1.1应用程序.现在,我有一个时区,用户可以从中选择时间并保存该时间,但是此时区下拉列表非常长,很难找到所需的时间.因此,我想分别放置小时和分钟的下拉列表.谁能帮我吗?

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?

推荐答案

这是我用于日期和时间字段的代码.您可以定义时间格式.

here is my code which i am using for date and time field.you can define format of time .

i>日期:

  new Ext.form.DateField({
                id : 'scheduleDate',
                fieldLabel : 'Date',
                format : 'd-M-Y',
                editable:false,
                minValue : new Date(),
                allowBlank : false

            })

ii>时间:

new Ext.form.TimeField({
            id : 'scheduleTime',
            fieldLabel : 'Time',
            allowBlank : false,
            editable:false,
            format : 'H:i',
            increment: 1
        })

这篇关于在extjs 3.1.1中显示小时和分钟的单独下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆