Results 1 to 4 of 4

Thread: Strange problem with DateField

  1. #1

    Lightbulb Strange problem with DateField

    Hello,

    I have update ExtJs 2.1 and now I have a problem.
    When I select first date field (e.g 10-May-2008) and after that I try to select date in the second date field, value of the first date field resets.

    In the previouse version of ExtJs that I have uploaded aprox 2 months ago it worked fine

    Here is code example:
    PHP Code:
    <html>
    <
    head>

    <
    link rel="stylesheet" type="text/css" href="ext-2.1/resources/css/ext-all.css"/>
    <
    script language="JavaScript" src="ext-2.1/adapter/ext/ext-base.js"></script>
    <script language="JavaScript" src="ext-2.1/ext-all.js"></script>
    <script language="JavaScript">

    /*
     * Ext JS Library 2.0.2
     * Copyright(c) 2006-2008, Ext JS, LLC.
     * [email protected]
     * 
     * http://extjs.com/license
     */

    Ext.onReady(function(){  
           viewport = new Ext.Viewport({
                layout:'border',
                items:[

                        new Ext.FormPanel({
                            region:'center',
                            id:'center',
                            collapsible: true,
                            margins:'0 5 5 5',
                            title:'Date Filter',
                            labelAlign: 'top',
                            title: 'Time Filter',
                            bodyStyle:'padding:5px',
                            height: 80,
                            items: [
                                    new Ext.form.DateField({
                                                        fieldLabel: 'From',
                                                        name: 'from',
                                                        id: 'from',
                                                        width:150,
                                                        allowBlank:true,
                                                        readOnly: true,
                                                        format: 'Y-M-d'
                                                    }),
                                    new Ext.form.DateField({
                                                        fieldLabel: 'To',
                                                        name: 'to',
                                                        id: 'to',
                                                        width:150,
                                                        allowBlank:true,
                                                        readOnly: true,
                                                        format: 'Y-M-d'
                                                    })
                            ]
                        })
                        ]
           });                                
    });

    </script>
    </head>
    <body>
    <div id="west"></div>
    <div id="center"></div>
    <div id="csvform" style="display:none"></div>
    </body>
    </html> 
    I have tested it in firefox2/3 and IE

    What's wrong with my code?
    Does anybody have any suggestion about the problem?

  2. #2
    Sencha Premium User
    Join Date
    Mar 2007
    Location
    Norway
    Posts
    197

    Default

    parseDate issue.... been there, cursed at it, and found the solution

    http://extjs.com/forum/showthread.php?t=33112

    Copy the code in mystix' post into your ext-overrides or directly into the ext-all.js (in the bottom)


    -bone
    Founder of the Path of Exticism

  3. #3
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236

    Default

    Quote Originally Posted by bone View Post
    been there, cursed at it, and found the solution
    that explains why i've been sneezing incessantly these past two months...

  4. #4
    Sencha Premium User
    Join Date
    Mar 2007
    Location
    Norway
    Posts
    197

    Default

    Quote Originally Posted by mystix View Post
    that explains why i've been sneezing incessantly these past two months...
    (in mr.burns voice)
    eeeeextellent!


    Last edited by bone; 3 Jul 2008 at 6:01 AM. Reason: i just love editing
    Founder of the Path of Exticism

Posting Permissions

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