EXT3.2 版本Ext DateField显示日期时间方法

multi-lang.js:

 

MultiLangDemo = function() {
    return {
        init: function() {
            Ext.QuickTips.init();
           
            new Ext.form.DateField({
             renderTo: 'datefield',
         fieldLabel: 'Register Date',
         name: 'register_date',
         width:190,
         allowBlank:false,
         altFormats: 'd/m/Y H:i:s',
         format:'Y-m-d H:i:s',
         emptyText:'Select a date...'
     })

       }
    };
}();
Ext.onReady(MultiLangDemo.init);

 

 

 

 

test.html

 

<!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>Multiple Languages</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all.js"></script>
</head>
<body class="x-gray">
<script type="text/javascript" src="multi-lang.js"></script>

<div id="datefield"></div>

</body>
</html>

你可能感兴趣的:(JavaScript,html,css,ext)