[CLOSED] [1.0] DateField give "this.trigger is undefined"

  1. #1

    [CLOSED] [1.0] DateField give "this.trigger is undefined"

    Hello,

    I am converting a 0.8.2 application to 1.0 and I am having problems with DateField controls. If I remove them from my page the error disappears. The cut down part of my aspx (because it's quite large) is:

    <ext:Viewport ID="ViewPort1" runat="server">
        <Items>
            <ext:BorderLayout ID="BorderLayout1" runat="server">
                <Center>
                    <ext:FormPanel ID="fpPremise" runat="server" Border="false" Method="POST" Url="/Premises/Domestic/EditData/"
                        MonitorPoll="500" MonitorValid="true" Layout="Fit">
                        <Items>
                            <ext:TabPanel ID="tpPremise" runat="server" ActiveTabIndex="0" Border="false" DeferredRender="true">
                                <Items>
                                    <ext:Panel ID="tbMain" runat="server" Title="Main Details" Layout="Column">
                                        <Items>
                                            <ext:Panel ColumnWidth=".5" ID="PanelPremiseDetails" runat="server" Border="false"
                                                Header="false" Layout="Form">
                                                <Defaults>
                                                    <ext:Parameter Name="MsgTarget" Value="side" />
                                                    <ext:Parameter Name="Anchor" Value="92%" />
                                                    <ext:Parameter Name="ReadOnly" Value="true" />
                                                </Defaults>
                                                <Items>
                                                    <ext:TextField ID="PREMID" runat="server" FieldLabel="PREMID" />
                                                    <ext:TextField ID="OCCUPIER" runat="server" FieldLabel="Occupier" />
                                                    <ext:TextField ID="PARENTIND" runat="server" FieldLabel="Parent Indicator" />
                                                    <ext:TextField ID="SITEIND" runat="server" FieldLabel="Site Indicator" />
                                                </Items>
                                            </ext:Panel>
                                            <ext:Panel ColumnWidth=".5" ID="PanelPremiseDetails2" runat="server" Border="false"
                                                Header="false" Layout="Form">
                                                <Defaults>
                                                    <ext:Parameter Name="MsgTarget" Value="side" />
                                                    <ext:Parameter Name="Anchor" Value="92%" />
                                                    <ext:Parameter Name="ReadOnly" Value="true" />
                                                </Defaults>
                                                <Items>
                                                    <ext:DateField ID="CEASEDATE" runat="server" FieldLabel="Ceased Date"  />
                                                    <ext:DateField ID="ACTIVEDATE" runat="server" FieldLabel="Active Date" />
                                                </Items>
                                            </ext:Panel>
                                        </Items>
                                    </ext:Panel>
                                </Items>
                            </ext:TabPanel>
                        </Items>
                        <BottomBar>
                            <ext:StatusBar ID="FormStatus" runat="server">
                                <Items>
                                    <ext:ToolbarHtmlElement Target="#{divStatus}" />
                                </Items>
                            </ext:StatusBar>
                        </BottomBar>
                        <Listeners>
                            <ClientValidation Fn="formValidation" />
                        </Listeners>
                    </ext:FormPanel>
                </Center>
                <South Collapsible="true" CollapseMode="Mini" Split="true">
                </South>
            </ext:BorderLayout>
        </Items>
    </ext:Viewport>
    I have removed several of the other fields that shouldn't make a difference.

    Any ideas what could be wrong?
  2. #2

    RE: [CLOSED] [1.0] DateField give "this.trigger is undefined"

    Okay, I have just found that it is the fact that I am setting ReadOnly to true as a Default. How come this has changed since v0.8.2?
  3. #3

    RE: [CLOSED] [1.0] DateField give "this.trigger is undefined"

    Hi,

    Please note in 1.0 version ReadOnly="true" for any trigger field hides the trigger. Use Editable="false" to prevent user input
  4. #4

    RE: [CLOSED] [1.0] DateField give "this.trigger is undefined"

    Thanks for getting back to me Vlad.

    Can you confirm what would be the right Defaults to set if the Panel contains both TextFields and DateFields?


    I am wanting to make sure that the user by default cant edit the form, but I also have a routine that puts the form into edit mode. I presume I want to make use of ReadOnly for Text and Editable for Date but don't know if I can apply this using "Defaults"?
  5. #5

    RE: [CLOSED] [1.0] DateField give "this.trigger is undefined"

    Hi,

    Defaults is applied for all items therefore you cannot use Editable and ReadOnly in the Default. You have to set it separately for each required item

Similar Threads

  1. [CLOSED] ext:NumberField and ext:DateField: Add trigger
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 03, 2012, 8:54 PM
  2. [CLOSED] Have cell, want to trigger editor and give focus...
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 21, 2011, 6:01 PM
  3. [CLOSED] DateField - Hide trigger and date picker no-show
    By thchuong in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 12, 2011, 2:02 PM
  4. [CLOSED] Menu closes on DateField trigger click
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 20, 2011, 7:54 PM
  5. Replies: 5
    Last Post: Sep 03, 2010, 8:19 PM

Posting Permissions