我正在尝试将此链接上的第三方扩展名仅用于time
字段。如何在 sencha touch 2.1 中使用它?
编辑
我添加了扩展,ux\picker
然后我使用了以下代码
Ext.define('HB.view.Search', {
extend: 'Ext.form.Panel',
xtype: 'search',
Ext.require(['Ext.ux.picker.DateTimePicker']),
config: {
title: 'Search',
layout: 'fit',
scrollable: true,
styleHtmlContent: true,
styleHtmlCls: 'searchpage',
//html: ['<h1>Welcome to MyApp</h1>'].join(''),
items: [
{
xtype: 'titlebar',
title: 'Search Page',
docked: 'top'
},
{
xtype: 'textfield',
name: 'from',
placeHolder: 'From'
},
{
xtype: 'textfield',
name: 'to',
placeHolder: 'To'
},
{
xtype: 'datepickerfield',
name: 'date',
value: new Date()
},
{
xtype: 'datetimepickerfield',
name: 'time',
value: new Date()
}
]
},
//style: 'height:' + (Ext.getBody().getHeight()) + 'px;'
height: Ext.getBody().getHeight()
});
但它给了我这个错误
GET http://localhost/HelsinkiBus/touch/src/DateTimePicker.js?_dc=1357800622746 404 (Not Found)
Uncaught Error: [Ext.Loader] Failed loading 'touch/src/DateTimePicker.js', please verify that the file exists