DateMenu does not work when an ID is specified

  1. #1

    DateMenu does not work when an ID is specified

    Ext.Net version: 4.4.0

    Hello,

    The DateMenu component does not work when it has an ID. We discovered this issue when upgrading from 4.2.2 to 4.4.0. This page demonstrates the issue:

    <%@ Page Language="C#"  %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext" %>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Button runat="server" Text="Button with DateMenu">
                <Menu>
                    <ext:DateMenu runat="server" ID="TestMenu" />
                </Menu>
            </ext:Button>
        </form>
    </body>
    </html>
    When the button is clicked, nothing happens and the following error is logged in the chrome console: "Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The new child element contains the parent.". Firefox shows a slightly different error, but the effect is the same.
    Changing the ResourceManager ScriptMode to "Debug" logs "[E] Ext.ComponentManager.register(): Duplicate component id "TestMenu"" instead.

    I believe the issue is that the Ext.Js Ext.menu.DatePicker class expects a "pickerCfg" config option, but Ext.Net provides a "pickerConfig" option instead. This in turn causes the Ext.picker.Date component to have the same ID as the Ext.menu.DatePicker.

    We currently use the following override as a workaround:

    Ext.define(null, {
        override: "Ext.menu.DatePicker",
    
        initComponent: function () {
            this.pickerCfg = this.pickerCfg || this.pickerConfig;
            this.callParent(arguments);
        }
    });
    Best regards,
    Raphael
  2. #2
    Hello, Raphael!

    Thanks for reporting the issue, and sorry for the delay getting to it! We've logged it in our issues tracker under #1545. We could reproduce the issue in native ExtJS (without Ext.NET) so this one issue comes from the underlying framework Ext.NET uses.

    Thanks also for the override that works for you. For the code it contains, seems that Sencha could have overlooked a variable rename at some point and that caused the issue.

    We'll update this thread as soon as there's a fix or an update from the issue. Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [OPEN] [#1381] [4.1.0] DateMenu issue
    By Edgar in forum Bugs
    Replies: 5
    Last Post: Sep 17, 2016, 2:11 AM
  2. Replies: 2
    Last Post: Aug 15, 2011, 9:49 AM
  3. [CLOSED] hideOnClick in DateMenu is lost...
    By pil0t in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 13, 2010, 12:25 PM
  4. [CLOSED] Set value of datemenu
    By wazige in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 17, 2009, 5:36 AM
  5. [CLOSED] DateMenu in a SplitButton
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 15, 2008, 3:25 PM

Posting Permissions