Results 1 to 2 of 2

Thread: BUG in Ext.form.DateField with fomat 'W Y' using Ext.Viewport

  1. #1

    Default BUG in Ext.form.DateField with fomat 'W Y' using Ext.Viewport

    Hello..
    I have this wired error..
    In my page is a viewport and a datefield with format 'W-Y' (01-2010, 16-2010, 52-2010)
    If I choose other date (for example 14 Nov 2010), and I leave the field, this change to actual date.

    If I comment the viewport definition (that is empty) works fine!!

    Code:
    var viewport = new Ext.Viewport({ 
    });

    the problem is that my datefield is inside a viewport!

    the code:

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>    
         <!-- Ext JS -->
            <script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
            <script type="text/javascript" src="ext/ext-all.js"></script>
            <script type="text/javascript" src="ext/src/locale/ext-lang-es.js"></script>
            <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css"/>
            <script type="text/javascript">
            
               Ext.onReady(function(){
                    
                    var toolbar = new Ext.Toolbar({
                        renderTo: document.body,
                        frame: true,
                        style:{
                            margin:'10px',
                            padding: '4px',
                            height: '20px',
                            border: '1px solid #dedede'
                        },
                        items:[
                            "DON'T WORK: ", 
                            {
                                xtype: 'datefield',
        			    id:'this_DONT_Work',
        			    format: 'W-Y',
                                value: new Date().dateFormat('W-Y')
                            }, 
                            '-',
                            'Works fine: ', 
                            {
                                xtype: 'datefield',
        			    id:'this_work',
        			    format: 'Y-m-d',
                                value: new Date().dateFormat('Y-m-d')
                            }
                        ]
                    })
                    
                    // if I remove this works fine!
                    
                    var viewport = new Ext.Viewport({ 
                    });
                    
                });
            </script>
            
    </head>
    <body>
    
    </body>
    </html>

  2. #2

    Default

    anyone?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •