Browse Source

Fix dayoffs

pull/1/head
Wahyu Ramadhan 2 years ago
parent
commit
60ae956999
  1. 1
      codebase/dhtmlxgantt801.css
  2. 43
      codebase/dhtmlxgantt801.js
  3. 8
      edit-mode/function/ganttSettings.js
  4. 4
      edit-mode/index.html

1
codebase/dhtmlxgantt801.css

File diff suppressed because one or more lines are too long

43
codebase/dhtmlxgantt801.js

File diff suppressed because one or more lines are too long

8
edit-mode/function/ganttSettings.js

@ -209,6 +209,14 @@ async function initGanttSettings() {
gantt.setWorkTime({ day:dayoff[i], hours:false }); gantt.setWorkTime({ day:dayoff[i], hours:false });
} }
} }
for (let index = 1; index <= 7; index++) {
const dateToCheck = new Date(2023, 4, index); // Note: Month is 0-based, so 5 represents June
if (gantt.isWorkTime({ date: dateToCheck, hours: false })) {
console.log(dateToCheck.toString() + ' is work time.');
} else {
console.log(dateToCheck.toString() + ' is not work time.');
}
}
} }
} }

4
edit-mode/index.html

@ -12,8 +12,8 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bbbootstrap/libraries@main/choices.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bbbootstrap/libraries@main/choices.min.css">
<script src="../codebase/dhtmlxganttpro.js?v=7.1.8"></script> <script src="../codebase/dhtmlxgantt801.js?v=8.0.1"></script>
<link rel="stylesheet" href="../codebase/dhtmlxgantt.css?v=7.1.8"> <link rel="stylesheet" href="../codebase/dhtmlxgantt801.css?v=8.0.1">
<link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ=="

Loading…
Cancel
Save