代码片段:
// 放到Ext.application的launch方法里
Ext.Date.monthNames = [
'一月', '二月', '三月', '四月', '五月', '六月',
'七月', '八月', '九月', '十月', '十一月', '十二月'
];
// 放到Ext.form.Panel的items中
{
xtype: 'datepickerfield',
name: 'planTime',
label: '计划时间:',
required: true,
value: new Date(),
dateFormat: 'Y-m-d',
picker: {
doneButton: '确定',
cancelButton: '取消',
slotOrder: ['year', 'month', 'day']
}
}