<script type="text/javascript">
Ext.onReady(function() {
Ext.QuickTips.init(); //初始化信息提示功能
Ext.create('Ext.form.Panel',{
title:'Ext.form.field.Date实例',
renderTo:Ext.getBody(),
bodyPadding:5,
frame:true,
height:100,
width:300,
items:[{
fieldLabel:'日期选择框',
xtype:'datefield',
width:220,
labelSeparator:':',
msgTarget:'side', //tips(提示信息)显示在右边
autoFitErrors:false, //展示错误信息时是否自动调整字段组件宽度
format:'Y年m月d日', //显示日期的格式
maxValue:'12/31/2008', //允许选择的最大日期
minValue:'01/01/2008', //允许选择的最小日期
disabledDates:['2008年03月12日'], //禁止选择这一天
disabledDatesText:'禁止选择该日期', //提示信息
disabledDays:[0,6], //禁止选择周日,周六
disabledDaysText:'禁止选择该日期',
width:220,
value:'05/31/2008' //默认的日期
}]
});
});
</script>
Ext.onReady(function() {
Ext.QuickTips.init(); //初始化信息提示功能
Ext.create('Ext.form.Panel',{
title:'Ext.form.field.Date实例',
renderTo:Ext.getBody(),
bodyPadding:5,
frame:true,
height:100,
width:300,
items:[{
fieldLabel:'日期选择框',
xtype:'datefield',
width:220,
labelSeparator:':',
msgTarget:'side', //tips(提示信息)显示在右边
autoFitErrors:false, //展示错误信息时是否自动调整字段组件宽度
format:'Y年m月d日', //显示日期的格式
maxValue:'12/31/2008', //允许选择的最大日期
minValue:'01/01/2008', //允许选择的最小日期
disabledDates:['2008年03月12日'], //禁止选择这一天
disabledDatesText:'禁止选择该日期', //提示信息
disabledDays:[0,6], //禁止选择周日,周六
disabledDaysText:'禁止选择该日期',
width:220,
value:'05/31/2008' //默认的日期
}]
});
});
</script>