SugarCRM:月份和年份选择器在日期选择器中不起作用

SugarCRM: Month and Year selector is not working in datepicker

我有这样一种情况,当状态改变时,对话框 window 将打开。在那个对话框中 window 我有 3 个日期字段。我使用了 SugarCRM 的默认日期选择器。但是当我想更改年份和月份时,selector/input 不起作用。实际上,在单击这些时,鼠标指针会聚焦在第一个输入字段中。

我的代码如下:

$.each(calenderSets, function(index, value){
        Calendar.setup ({
            inputField : index,//input field Id
            ifFormat : cal_date_format,
            daFormat : cal_date_format,
            button : value,//calender icon ID
            singleClick : true,
            dateStr : "",
            step : 1,
            weekNumbers:false
        });
    });

和对话 window:

dialog = new YAHOO.widget.Dialog('dialog1', {
        width: winWidth,
        fixedcenter : "contained",
        visible : false,
        draggable: true,
        position: 'absolute',
        close:true,
        centered: true,
        /*effect:[{effect:YAHOO.widget.ContainerEffect.SLIDE, duration:0.2},
                {effect:YAHOO.widget.ContainerEffect.FADE,duration:0.2}],*/
        modal:true
    });
    dialog.setHeader("All * marked fields are required");
    dialog.setBody(Body here);
    dialog.setFooter('<button title="save" type="button" class="report-scheduler-btn" name="save" onClick="saveInvoiceDetails()">Save</button>');
    dialog.render(document.body);
    dialog.show();
    setCalenderToDateFields();

我刚刚发现并通过将以下内容添加到 custom/themes/default/css/style 中解决了这个问题。css:

.yui-calcontainer .yui-cal-nav {
    z-index: 1001;
}

因为我的日期选择器(和你的一样)在 UI 对话框容器中,所以 .yui-cal-nav class 中默认的 z-index 3 不够高与日期导航部分中的表单字段进行交互(尽管能够看到它们)。我的 UI 对话框的叠加层的 z-index 为 1000,因此将 .yui-cal-nav 的 z-index 设置为 1001 使其足够高,以便我可以与表单字段进行交互。