首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >xtype:感应器中的时间选择器2。与xtype相同:数据报警器。

xtype:感应器中的时间选择器2。与xtype相同:数据报警器。
EN

Stack Overflow用户
提问于 2012-09-26 11:14:30
回答 1查看 1.8K关注 0票数 0

在Sencha touch 2 MVC中,如何插入24小时格式的时间选择器?我希望它以一种形式,但无法实现。‘`var = Ext.define("TimeSheet.view.Newentry",{TimeSheet.view.Newentry:"Ext.TabPanel",要求:"Ext.XTemplate“、"Ext.field.DatePicker”、"Ext.field.Select“、"Ext.TitleBar”、"Ext.DateExtras“、xtype:'newentryview',

代码语言:javascript
复制
config: {
    //id: 'newEntry',
    autodestroy: true,
    fullscreen: true,
    scrollable: true,
    cardSwitchAnimation: 'cube',
    tabBar: {
        docked: 'top',
        layout: {
            pack: 'center'
        }
    },
    defaults: {
        styleHtmlContent: true
    },
    items: [{
        xtype: 'formpanel',
        name: 'entryForm',
        //id: 'entry',          
        style: 'border: none; font: 22px Arial black',
        title: 'Add Entry',
        fullscreen: true,
        iconMask: true,
        iconCls: 'info',
        items: [{
            xtype: 'fieldset',
            name: 'fieldSet',
            autoComplete: true,
            scrollable: false,
            cls: 'add',
            items: [{
                xtype: 'textfield',
                name: 'client',
                placeHolder: 'Client name'
            },{
                xtype: 'selectfield',
                name: 'project',
                    placeHolder: 'Project',
                    options: [
                        {text: 'First Option',  value: 'first'},
                        {text: 'Second Option', value: 'second'},
                        {text: 'Third Option',  value: 'third'}
                    ]
            },{
                xtype: 'textfield',
                name: 'task',
                placeHolder: 'Task'
            },{
                xtype: 'datepickerfield',
                name: 'date',
                value: new Date()
            },{
                xtype: 'datepickerfield',
                name: 'time',
                value: new Date(),
                //HERE I WANT THE TIME PICKER FIELD IN 24 HR FORMAT..
            },{
                xtype: 'textareafield',
                name: 'notes',
                ui: 'textarea',
                maxRows: 5,
                maxWidth: '100%',
                placeHolder: 'Add notes here...'
            },{
                xtype: 'panel',
                name: 'btnpanel',
                height: '51px',
                width: '100%',
                layout: {
                    type: 'hbox'
                },
                items: [{
                    xtype: 'button',
                    cls: 'btnreset',
                    text: 'Reset',
                    style: 'font-size: 14px',
                    //ui: 'confirm',
                    height: "35px",
                    width: '40%',
                    event: 'tap',
                    handler: function() {
                        console.log("reset");

                    }
                },{
                    xtype: 'spacer'
                },{
                    xtype: 'button',
                    //id: 'submit',
                    cls: 'btnsubmit',
                    text: 'Submit',
                    style: 'font-size: 14px',
                    //ui: 'confirm',
                    height: "35px",
                    width: '40%',
                    //go3: 'submitview' 
                    event: 'tap',
                    handler: function() {
                        console.log("Submitted");
                    }
                }]
            }]
        }]

    },{
        xtype: 'panel',
        style: 'border: none; font: 22px Arial black',
        title: 'Panel 2',
        fullscreen: true,
        html: 'Page 2',
    }]
}

);

EN

回答 1

Stack Overflow用户

发布于 2012-09-26 13:01:22

也许这能帮到你。

G --24小时格式,没有前导零--0到23

参考Ext.Date

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12600447

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档