ExtJS 3.x DateField menuListeners 显示/隐藏 | 珊瑚贝

ExtJS 3.x DateField menuListeners show/hide


每当我的 DateField 上发生显示/隐藏事件时,我都会尝试调用一些函数。我相信这些应该在菜单小部件打开和关闭时触??发。到目前为止,我还没有让我的测试 alert() 方法出现。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<body>

<script type=”text/javascript”>
    Ext.onReady(function() {

        var dField = new Ext.form.DateField({
            format: ‘M d, Y’,
            fieldLabel: ‘Date’,
            allowBlank:false,
            disabledDays:  [0, 6],
            enableKeyEvents :true,
            forceSelection: true,
            menuListeners: {
                hide:{fn:function() {
                    alert(“Bye”);
                }},
                show:{fn:function() {
                    alert(“Hi”);
                }}
            },
            listeners:{
                select:{fn:function(combo, value) {
                    alert(“select”);
                }}
            }
        });
        dField.render(‘dateField’);
    });

</body>


菜单监听器?我不知道有这样的财产。在 ExtJS 中,所有的事件方法都进入了监听器。

1
2
3
4
5
6
7
8
9
10
11
listeners:{
    select: function(combo, value) {
        alert(“select”);
    },
    hide: function(comp) {
        alert(‘Bye’);
    },
    show: function(comp) {
        alert(‘Hi’);
    }
}

现在,你会相应地调用 hide 和 show 方法。

  • 我遇到了一个问题,即隐藏/显示并不总是在 IE7 上触发。无法在简单的页面中重现。例如,如果我单击页面上的另一个单词,事件焦点/模糊将触发。希望拦截日历小部件的实际打开和关闭。


来源:https://www.codenong.com/5998350/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9359.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?