[CLOSED] DateColumn problem

  1. #1

    [CLOSED] DateColumn problem

    Hi,

    I'm adding some DateColumn columns into a GridPanel without specifying Format. It's working well in all browsers except IE. In IE, datecolumn displays NaN/NaN/0NaN

    Help is appreciated.

    Thank you.
    Attached Thumbnails Click image for larger version. 

Name:	IE.png 
Views:	216 
Size:	10.4 KB 
ID:	2148   Click image for larger version. 

Name:	FF.png 
Views:	156 
Size:	10.9 KB 
ID:	2149  
    Last edited by Daniil; Jan 13, 2011 at 9:55 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Could you, please, post a simplified sample to reproduce this issue?

    Just the information that you provided is not enough to reproduce.

    Please note that the issue can depend on locale which is set in OS, ResourceManager, code behind, browser. Please also provide this information.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { new DateTime(2011, 1, 1) },
                    new object[] { new DateTime(2011, 2, 1) },
                    new object[] { new DateTime(2011, 3, 1) }
                };
                store.DataBind();
            }
        }
    </script>
    
    <!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 runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
            <Store>
                <ext:Store runat="server">
                    <Reader>
                        <ext:ArrayReader>
                            <Fields>
                                <ext:RecordField Name="date" />
                            </Fields>
                        </ext:ArrayReader>
                    </Reader>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Header="Date" DataIndex="date" />
                </Columns>
            </ColumnModel>
        </ext:GridPanel>
        </form>
    </body>
    </html>
  3. #3
    Hi,

    I guess that your field is not Date or you did not set required format for the field. Do you get data from JSON web service? If yes then try to set DateFormat="M$" for the field
  4. #4
    Hi Vladimir,

    The problem is that why it's working on all browsers except IE. Please take a look at my sample.

    Thank you
    Attached Files
  5. #5
    Hi,

    There is no so good date parser in IE. So, sometimes issues like this one happens.

    Please set explicitly Type="Date" for RecordField.

    Example
    <ext:RecordField Name="Date" Type="Date" />
  6. #6
    Hi Daniil,

    I had done like your suggestion. You can mark it CLOSED now.

    Thanks for your support in advance.

Similar Threads

  1. [CLOSED] How to set formatDate of dateColumn
    By tactime10 in forum 1.x Legacy Premium Help
    Replies: 16
    Last Post: Feb 28, 2012, 11:57 AM
  2. Replies: 1
    Last Post: Nov 29, 2011, 5:11 PM
  3. Grid with datecolumn
    By PetrSnobelt in forum 1.x Help
    Replies: 6
    Last Post: Sep 06, 2011, 12:47 PM
  4. [CLOSED] DateColumn, Format
    By jeybonnet in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 03, 2010, 1:57 PM
  5. [CLOSED] Can a DateColumn be empty in GridPanel?
    By logicspeak in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 20, 2010, 12:49 AM

Posting Permissions