<!--
/*
* @Author: aqlu, lu_anqing@hotmail.com
* @Date: 2010-11-08
*/
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>extjs 日期时间</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="./css/datetime.css"></link>
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all.js"></script>
<script type="text/javascript" src="./Ext.ux.DateTimeField_all.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
Ext.BLANK_IMAGE_URL = "../../resources/images/default/s.gif";
Ext.QuickTips.init();
// turn on validation errors beside the field globally
Ext.form.Field.prototype.msgTarget = 'side';
var simple = new Ext.FormPanel({
labelWidth: 75, // label settings here cascade unless overridden
title: 'Simple Form',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'first',
allowBlank:false
},{
fieldLabel: 'Last Name',
name: 'last'
},{
fieldLabel: 'Company',
name: 'company'
}, {
fieldLabel: 'Email',
name: 'email',
vtype:'email'
}, new Ext.form.TimeField({
fieldLabel: 'Time',
name: 'time',
minValue: '8:00am',
maxValue: '6:00pm'
}),
new Ext.form.DateField({
fieldLabel: 'Date',
name: 'planbegintime',
format:'Y-m-d'
}),
new Ext.form.DateTimeField({
fieldLabel: 'Date time',
name: 'planbegintime',
format:'Y-m-d H:i:s'
})
],
buttons: [{
text: 'Save'
},{
text: 'Cancel'
}]
});
simple.render('form-ct');
});
</script>
<div id="form-ct" style="padding-top:3px;padding-left:3px;"></div>
</body>
</html>
- 1
- 2
- 3
- 4
- 5
- 6
前往页