DateField Problem

  1. #1

    DateField Problem

    Hi All,

    Why the DateField not displayed in right place?

    the operated process:
    1. Click the DateField image: Click image for larger version. 

Name:	1.jpg 
Views:	183 
Size:	86.6 KB 
ID:	3081
    2. It displayed as: Click image for larger version. 

Name:	2.jpg 
Views:	103 
Size:	36.0 KB 
ID:	3082

    The code snippet:
    <ext:Panel ID="panelList" runat="server" Title="科研项目" Height="700">
            <Items>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <North MarginsSummary="5 5 5 5">
                        <ext:TabPanel ID="TabPanel1" runat="server" Height="160">
                            <Items>
                                <ext:FormPanel ID="Panel1" runat="server" Title="项目查询" PaddingSummary="5" Layout="FormLayout">
                                    <Items>
                                        <ext:TableLayout ID="tbQuery" ColumnWidth="0.33" Columns="3" runat="server">
                                            <Cells>
                                                <ext:Cell>
                                                    <ext:TextField ID="txtProjectName" FieldLabel="项目名称" runat="server"></ext:TextField>
                                                </ext:Cell>
                                                <ext:Cell>
                                                    <ext:TextField ID="txtCharger" FieldLabel="项目负责人"  runat="server"></ext:TextField>
                                                </ext:Cell>
                                                <ext:Cell>
                                                    <ext:TextField ID="txtDepName" FieldLabel="承接部门名称" runat="server"></ext:TextField>
                                                </ext:Cell>
                                            </Cells>
                                            <Cells>
                                                <ext:Cell>
                                                    <ext:Checkbox ID="chkIsEnded" FieldLabel="是否结项" runat="server">
                                                        <Listeners>
                                                            <Check Fn="chkIsEnded_Checked(this)" />
                                                        </Listeners>
                                                    </ext:Checkbox>
                                                </ext:Cell>
                                                <ext:Cell CellId="clDateStart">
                                                    <ext:DateField ID="dfStart" FieldLabel="结项时间上限" Format="yyyy-MM-dd" Width="220" runat="server" />
                                                </ext:Cell>
                                                <ext:Cell CellId="clDateEnd">
                                                    <ext:DateField ID="dfEnd" FieldLabel="结项时间下限" Format="yyyy-MM-dd" Width="220" runat="server" />
                                                </ext:Cell>
                                            </Cells>
                                            <Cells>
                                                <ext:Cell ColSpan="3">
                                                    <ext:Button ID="btnSubmit" runat="server" Text="确定" Height="20" Width="80" OnDirectClick="btnSubmit_DirectClick">
                                                    </ext:Button>
                                                </ext:Cell>
                                            </Cells>
                                        </ext:TableLayout>
                                    </Items>
                                </ext:FormPanel>
                            </Items>
                        </ext:TabPanel>
                    </North>
    Last edited by geoffrey.mcgill; Aug 17, 2011 at 1:06 AM. Reason: please use [CODE] tags
  2. #2
    Hi,

    The code you posted appears to be correct. I was not able to reproduce the issue.

    Here's a cleaned up version which demonstrates what I was testing with and also demonstrates an optimised Layout configuration which removes the Layout Controls.

    Example

    <%@ Page Language="C#" %> 
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <!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:Panel runat="server" Title="科研项目" Height="700" Layout="BorderLayout">
                <Items>
                    <ext:TabPanel runat="server" Region="North" Margins="5 5 5 5" Height="160" >
                        <Items>
                            <ext:FormPanel runat="server" Title="项目查询" PaddingSummary="5" Layout="TableLayout">
                                <LayoutConfig>
                                    <ext:TableLayoutConfig Columns="3" />
                                </LayoutConfig>
                                <Items>
                                    <ext:TextField runat="server" FieldLabel="项目名称" ColumnWidth="0.33" />
                                    <ext:TextField runat="server" FieldLabel="项目负责人" ColumnWidth="0.33" />
                                    <ext:TextField runat="server" FieldLabel="承接部门名称" ColumnWidth="0.33" />
                                    <ext:Checkbox runat="server" FieldLabel="是否结项" />
                                    <ext:DateField runat="server" FieldLabel="结项时间上限" Format="yyyy-MM-dd" Width="220" />
                                    <ext:DateField runat="server" FieldLabel="结项时间下限" Format="yyyy-MM-dd" Width="220" />
                                    <ext:Button runat="server" Text="确定" Height="20" Width="80" />
                                </Items>
                            </ext:FormPanel>
                        </Items>
                    </ext:TabPanel>
                    <ext:Panel runat="server" Region="Center" Title="Center" />
                </Items>
            </ext:Panel>
        </form>
    </body>
    </html>
    Geoffrey McGill
    Founder
  3. #3
    Hi McGill,

    Thanks for code for optimised Layout.

    I've changed as optimised Layout. The calendar still displayed in the right corner of page, with both ver & hor scroll bar appeared.
    BTW. I use a Master page for the whole site, will that affected the layout of ext control display?

    Regards

Similar Threads

  1. [FIXED] [2.0] DateField Problem
    By MrMp3 in forum Bugs
    Replies: 3
    Last Post: Dec 12, 2012, 4:07 AM
  2. Problem with Datefield
    By xcream in forum 1.x Help
    Replies: 0
    Last Post: May 30, 2012, 8:14 AM
  3. Datefield in gridpanel problem
    By Richardt in forum 1.x Help
    Replies: 2
    Last Post: Apr 03, 2010, 4:30 PM
  4. [0.8.2] Problem with datefield
    By plykkegaard in forum 1.x Help
    Replies: 0
    Last Post: Jan 20, 2010, 5:13 PM
  5. DateField - SelectedDate problem
    By Puia in forum 1.x Help
    Replies: 3
    Last Post: Sep 14, 2009, 12:16 PM

Posting Permissions