<script type="text/javascript">
        Ext.onReady(function(){
            var ed = new Ext.form.DateField({
                renderTo: 'TrainApplyBean.trainDate',
                //applyTo: 'TrainApplyBean.trainDate',
                format: 'Y-m-d',
                //width:200,
                readOnly: false
            });
        });
    </script>
    <div id="TrainApplyBean.trainDate" class="w138"></div>

解决方案 »

  1.   

    用这个属性的话,就报错
    网页错误详细信息用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
    时间戳: Mon, 23 Jun 2014 03:17:51 UTC
    消息: 该操作的目标元件无效。
    行: 12968
    字符: 17
    代码: 0
    URI: http://localhost:8080/mrpx/js/ext/ext-all-debug.js
      

  2.   

    你看看官方的example,不要手动fom标签,要用formpanel.
      

  3.   

    以前看有人手动FORM也是这种写法