sencha:日期选择组件datepicker

来源于《sencha touch权威指南》

-------------------------------

除app.js外,其它内容都与上一篇博客里的内容相同。app.js代码如下:

Ext.require(['Ext.form.Panel','Ext.form.FieldSet','Ext.field.Radio','Ext.field.Select','Ext.TitleBar','Ext.field.DatePicker']);
Ext.application({
    name: 'MyApp',
    icon: 'images/icon.png',
    glossOnIcon: false,
    phoneStartupScreen: 'images/phone_startup.png',
    tabletStartupScreen: 'images/tablet_startup.png',
    
    launch: function(){
        var formPanel = Ext.create('Ext.form.Panel',{
            id: 'formPanel',
            scrollable: 'vertical',
            items: [{
                xtype: 'fieldset',
                title: '电影信息',
                instructions: '请填写电影信息',
                defaults:{
                    labelwidth: '20%'
                },
                items:[{
                    xtype: 'datepickerfield',
                    name: 'released',
                    label: '发行日期',
                    picker:{
                        yearFrom: 2000,
                        yearTo: 2100
                    },
                    value: new Date(),
                    dateFormat: 'Y/m/d',
                }]
            }]
        });
        Ext.Viewport.add(formPanel);
    }
});

 

chrome浏览器显示如下:

posted @ 2013-12-01 16:35  php之路  阅读(417)  评论(0编辑  收藏  举报