在做一个项目 有段输入框需要用日历控件 但要求精确到月份即可 并在输入框默认值为当前月份 尝试了几次终于得到解决 下面贴上代码
{
fieldLabel : "购买时间(月)",
xtype : "monthfield",
allowBlank : false,
format : "Y-m",
value : new Date()
}
fieldLabel : "购买时间(月)",
xtype : "monthfield",
allowBlank : false,
format : "Y-m",
value : new Date()
}