| 2077 | return !!(element.querySelector(".dhx_cal_header") && element.querySelector(".dhx_cal_data") && element.querySelector(".dhx_cal_navline")); |
| 2078 | } |
| 2079 | function createDefaultHeader(scheduler3) { |
| 2080 | const views = ["day", "week", "month"]; |
| 2081 | const date = ["date"]; |
| 2082 | const nav = ["prev", "today", "next"]; |
| 2083 | if (scheduler3.matrix) { |
| 2084 | for (const i in scheduler3.matrix) { |
| 2085 | views.push(i); |
| 2086 | } |
| 2087 | } |
| 2088 | if (scheduler3._props) { |
| 2089 | for (const i in scheduler3._props) { |
| 2090 | views.push(i); |
| 2091 | } |
| 2092 | } |
| 2093 | if (scheduler3._grid && scheduler3._grid.names) { |
| 2094 | for (const i in scheduler3._grid.names) { |
| 2095 | views.push(i); |
| 2096 | } |
| 2097 | } |
| 2098 | const optionalViews = ["map", "agenda", "week_agenda", "year"]; |
| 2099 | optionalViews.forEach(function(viewName) { |
| 2100 | if (scheduler3[viewName + "_view"]) { |
| 2101 | views.push(viewName); |
| 2102 | } |
| 2103 | }); |
| 2104 | return views.concat(date).concat(nav); |
| 2105 | } |
| 2106 | scheduler2._getInitialState = function(provided) { |
| 2107 | const initialDate = provided.date || this._currentDate(); |
| 2108 | const initialView = provided.mode || "week"; |