简体   繁体   English

如何在Oracle Apex日历中禁用对旧日期的鼠标单击

[英]How to disable mouse click on old dates in Oracle Apex Calendar

I have one Oracle Apex calendar in my scheduler application . 我的调度程序应用程序中有一个Oracle Apex日历。 With create link and view/edit link enabled to different pages in application. 使用创建链接和查看/编辑链接启用到应用程序中的不同页面。

Is there any way to disable click on old dates from today. 有什么方法可以禁用从今天开始点击旧日期的功能。

I have tried css ways , but its not working . 我已经尝试过CSS方式,但无法正常工作。

td .fc-day.ui-widget-content.fc-past{  
   pointer-events:none !important;
   background-color: gray;
}

Above code only changes the color. 上面的代码仅更改颜色。

Please help . 请帮忙 。

Is there any way by using jquery or javascript to disable these old dates ?? 有什么办法可以使用jquery或javascript禁用这些旧日期?

enter code here

After going through details about full calendar i found out the solution . 在查看了有关完整日历的详细信息之后,我找到了解决方案。 I had to put the below code in 'JavaScript Initialization Code' section of Apex calendar attributes . 我必须将以下代码放在Apex日历属性的“ JavaScript初始化代码”部分中。

function (pOptions) {
    pOptions.weekNumberCalculation= 'ISO';
    pOptions.weekNumbers = true; 
    pOptions.weekNumberTitle = "W";
    pOptions.selectAllow = function (info) {
        if (info.start.isBefore(moment().add(-1, 'days')))
            return false;
        return true;
    }
    return pOptions;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM