來源於《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瀏覽器顯示如下: