radioGroup监听
字号:大 中 小 订阅
//选择公历/农历radiogroup
var calendar = new Ext.form.RadioGroup({
fieldLabel: '历法'
,allowBlank: false
,items: [
{
boxLabel: '公历'
,name: 'blunar'
,inputValue: 0
,checked: true
,listeners: {
check: function(field,checked){
if(checked){
//隐藏农历日
hideField(form.getForm().findField('luday'));
//隐藏农历月*闰月
hideField(form.getForm().findField('lumonth'));
hideField(form.getForm().findField('leapmonth'));
//显示公历日
showField(form.getForm().findField('solarday'));
}
}
}
}
,{
boxLabel: '农历'
,name: 'blunar'
,inputValue: 1
,listeners: {
check: function(field,checked){
if(checked){
//隐藏公历日
hideField(form.getForm().findField('solarday'));
//显示农历日
showField(form.getForm().findField('luday'));
//显示农历月*闰月
showField(form.getForm().findField('lumonth'));
showField(form.getForm().findField('leapmonth'));
}
}
}
}
]
var calendar = new Ext.form.RadioGroup({
fieldLabel: '历法'
,allowBlank: false
,items: [
{
boxLabel: '公历'
,name: 'blunar'
,inputValue: 0
,checked: true
,listeners: {
check: function(field,checked){
if(checked){
//隐藏农历日
hideField(form.getForm().findField('luday'));
//隐藏农历月*闰月
hideField(form.getForm().findField('lumonth'));
hideField(form.getForm().findField('leapmonth'));
//显示公历日
showField(form.getForm().findField('solarday'));
}
}
}
}
,{
boxLabel: '农历'
,name: 'blunar'
,inputValue: 1
,listeners: {
check: function(field,checked){
if(checked){
//隐藏公历日
hideField(form.getForm().findField('solarday'));
//显示农历日
showField(form.getForm().findField('luday'));
//显示农历月*闰月
showField(form.getForm().findField('lumonth'));
showField(form.getForm().findField('leapmonth'));
}
}
}
}
]