Skip to content

Commit 4c7d40a

Browse files
committed
[update] version 7.2.2
1 parent 9dfcff8 commit 4c7d40a

13 files changed

+945
-1052
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# dhtmlxScheduler #
22

33
[![dhtmlx.com](https://img.shields.io/badge/made%20by-DHTMLX-blue)](https://dhtmlx.com/)
4-
[![npm: v.7.2.1](https://img.shields.io/badge/npm-v.7.2.1-blue.svg)](https://www.npmjs.com/package/dhtmlx-scheduler)
4+
[![npm: v.7.2.2](https://img.shields.io/badge/npm-v.7.2.2-blue.svg)](https://www.npmjs.com/package/dhtmlx-scheduler)
55
[![License: GPL v2](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
66

77
[DHTMLX Scheduler](https://dhtmlx.com/docs/products/dhtmlxScheduler) is a JavaScript library that allows you to add a Google-like scheduler to your web app or website.
@@ -87,7 +87,7 @@ scheduler.parse([
8787

8888
## License ##
8989

90-
dhtmlxScheduler v.7.2.1 Standard
90+
dhtmlxScheduler v.7.2.2 Standard
9191

9292
To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com
9393

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scheduler",
3-
"version": "7.2.1",
3+
"version": "7.2.2",
44
"homepage": "https://dhtmlx.com/docs/products/dhtmlxScheduler/",
55
"description": "JavaScript event calendar. Allows to manage events and appointments in different views",
66
"main": [

codebase/dhtmlxscheduler.es.js

Lines changed: 855 additions & 874 deletions
Large diffs are not rendered by default.

codebase/dhtmlxscheduler.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/dhtmlxscheduler.js

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/dhtmlxscheduler.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/sources/dhtmlxscheduler.es.js

Lines changed: 21 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @license
22

3-
dhtmlxScheduler v.7.2.1 Standard
3+
dhtmlxScheduler v.7.2.2 Standard
44

55
To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com
66

@@ -78,6 +78,14 @@ function dragHighlightPos(scheduler2) {
7878
setRequiredStylesToMarker(eventNode2, layout);
7979
const sections = {};
8080
let markerObject = { start_date: event3.start_date, end_date: event3.end_date, css: "dhx_scheduler_dnd_marker", html: eventNode2 };
81+
if (layout == "timeline") {
82+
const viewObj = scheduler2.getView(viewName);
83+
if (viewObj.round_position) {
84+
const index = scheduler2._get_date_index(viewObj, event3.start_date);
85+
const rounded_date = viewObj._trace_x[index];
86+
markerObject.start_date = rounded_date;
87+
}
88+
}
8189
if (layout == "timeline" || layout == "month") {
8290
markerObject = { ...markerObject, end_date: scheduler2.date.add(event3.start_date, 1, "minute") };
8391
}
@@ -9015,7 +9023,7 @@ class DatePicker {
90159023
const dayElement = document.createElement("div");
90169024
dayElement.setAttribute("data-cell-date", scheduler2.templates.format_date(currDate));
90179025
dayElement.setAttribute("data-day", currDate.getDay());
9018-
dayElement.innerHTML = currDate.getDate();
9026+
dayElement.innerHTML = scheduler2.templates.month_day(currDate);
90199027
if (currDate.valueOf() < monthStart.valueOf()) {
90209028
dayElement.classList.add("dhx_before");
90219029
} else if (currDate.valueOf() >= monthEnd.valueOf()) {
@@ -9120,7 +9128,7 @@ class DatePicker {
91209128
}
91219129
}
91229130
function factoryMethod(extensionManager) {
9123-
const scheduler2 = { version: "7.2.1" };
9131+
const scheduler2 = { version: "7.2.2" };
91249132
scheduler2.$stateProvider = StateService();
91259133
scheduler2.getState = scheduler2.$stateProvider.getState;
91269134
extend$n(scheduler2);
@@ -18560,6 +18568,10 @@ function recurring(scheduler2) {
1856018568
setPropsForFirstOccurrence(event2, occurrence);
1856118569
return scheduler2.showLightbox_rec(pid);
1856218570
}
18571+
if (scheduler2._isFirstOccurrence(occurrence)) {
18572+
setPropsForFirstOccurrence(event2, occurrence);
18573+
return scheduler2.showLightbox_rec(pid);
18574+
}
1856318575
const tempStart = new Date(event2.start_date);
1856418576
event2._end_date = event2.end_date;
1856518577
event2._start_date = tempStart;
@@ -18820,7 +18832,7 @@ function recurring(scheduler2) {
1882018832
if (!seriesExceptions) {
1882118833
seriesExceptions = {};
1882218834
}
18823-
from = toUTCDate(from || new Date(scheduler2._min_date.valueOf() - 1e3));
18835+
from = toUTCDate(from || new Date(scheduler2._min_date.valueOf() - 7 * 24 * 60 * 60 * 1e3));
1882418836
to = toUTCDate(to || new Date(scheduler2._max_date.valueOf() - 1e3));
1882518837
const utcStart = toUTCDate(ev.start_date);
1882618838
let parsedRRule;
@@ -18845,7 +18857,7 @@ function recurring(scheduler2) {
1884518857
const date = repeatedDates[i];
1884618858
let exception = seriesExceptions[date.valueOf()];
1884718859
if (exception) {
18848-
if (exception.deleted) {
18860+
if (exception.deleted || exception.end_date.valueOf() < scheduler2._min_date.valueOf()) {
1884918861
continue;
1885018862
} else {
1885118863
visibleCount++;
@@ -18857,6 +18869,9 @@ function recurring(scheduler2) {
1885718869
copy2.start_date = date;
1885818870
copy2.id = ev.id + "#" + Math.ceil(date.valueOf());
1885918871
copy2.end_date = new Date(date.valueOf() + eventDuration * 1e3);
18872+
if (copy2.end_date.valueOf() < scheduler2._min_date.valueOf()) {
18873+
continue;
18874+
}
1886018875
copy2.end_date = scheduler2._fix_daylight_saving_date(copy2.start_date, copy2.end_date, ev, date, copy2.end_date);
1886118876
copy2._timed = scheduler2.isOneDayEvent(copy2);
1886218877
if (!copy2._timed && !scheduler2._table_view && !scheduler2.config.multi_day)
@@ -18873,7 +18888,7 @@ function recurring(scheduler2) {
1887318888
for (let a in seriesExceptions) {
1887418889
let exception = seriesExceptions[a];
1887518890
if (exception) {
18876-
if (exception.deleted) {
18891+
if (exception.deleted || exception.end_date.valueOf() < scheduler2._min_date.valueOf()) {
1887718892
continue;
1887818893
} else if (from && to && exception.start_date < to && exception.end_date > from) {
1887918894
stack.push(exception);
@@ -21011,69 +21026,6 @@ function year_view(scheduler2) {
2101121026
scheduler2._hideToolTip();
2101221027
}
2101321028
};
21014-
scheduler2._reset_year_scale = function() {
21015-
this._cols = [];
21016-
this._colsS = {};
21017-
var week_starts = [];
21018-
var dataArea = this._els["dhx_cal_data"][0];
21019-
var c = this.config;
21020-
dataArea.scrollTop = 0;
21021-
dataArea.innerHTML = "";
21022-
Math.floor((parseInt(dataArea.style.height) - scheduler2.xy.year_top) / c.year_y);
21023-
var week_template = document.createElement("div");
21024-
var dummy_date = this.date.week_start(scheduler2._currentDate());
21025-
this._process_ignores(dummy_date, 7, "day", 1);
21026-
for (var i = 0; i < 7; i++) {
21027-
if (!(this._ignores && this._ignores[i])) {
21028-
this._cols[i] = "var(--dhx-scheduler-datepicker-cell-size)";
21029-
this._render_x_header(i, 0, dummy_date, week_template);
21030-
}
21031-
dummy_date = this.date.add(dummy_date, 1, "day");
21032-
}
21033-
week_template.lastChild.className += " dhx_scale_bar_last";
21034-
for (var i = 0; i < week_template.childNodes.length; i++) {
21035-
this._waiAria.yearHeadCell(week_template.childNodes[i]);
21036-
}
21037-
var sd = this.date[this._mode + "_start"](this.date.copy(this._date));
21038-
var ssd = sd;
21039-
var yearBox = null;
21040-
const wrapper = document.createElement("div");
21041-
wrapper.classList.add("dhx_year_wrapper");
21042-
for (var i = 0; i < c.year_y; i++) {
21043-
for (var j = 0; j < c.year_x; j++) {
21044-
yearBox = document.createElement("div");
21045-
yearBox.className = "dhx_year_box";
21046-
yearBox.setAttribute("date", this._helpers.formatDate(sd));
21047-
yearBox.setAttribute("data-month-date", this._helpers.formatDate(sd));
21048-
yearBox.innerHTML = "<div class='dhx_year_month'></div><div class='dhx_year_grid'><div class='dhx_year_week'>" + week_template.innerHTML + "</div><div class='dhx_year_body'></div></div>";
21049-
var header = yearBox.querySelector(".dhx_year_month");
21050-
var grid = yearBox.querySelector(".dhx_year_grid");
21051-
var body = yearBox.querySelector(".dhx_year_body");
21052-
var headerId = scheduler2.uid();
21053-
this._waiAria.yearHeader(header, headerId);
21054-
this._waiAria.yearGrid(grid, headerId);
21055-
header.innerHTML = this.templates.year_month(sd);
21056-
var dd = this.date.week_start(sd);
21057-
this._reset_month_scale(body, sd, dd, 6);
21058-
var days = body.querySelectorAll("td");
21059-
for (var day = 0; day < days.length; day++) {
21060-
this._waiAria.yearDayCell(days[day]);
21061-
}
21062-
wrapper.appendChild(yearBox);
21063-
week_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;
21064-
sd = this.date.add(sd, 1, "month");
21065-
}
21066-
}
21067-
dataArea.appendChild(wrapper);
21068-
var dateElement = this._getNavDateElement();
21069-
if (dateElement) {
21070-
dateElement.innerHTML = this.templates[this._mode + "_date"](ssd, sd, this._mode);
21071-
}
21072-
this.week_starts = week_starts;
21073-
week_starts._month = ssd.getMonth();
21074-
this._min_date = ssd;
21075-
this._max_date = sd;
21076-
};
2107721029
scheduler2._reset_year_scale = function() {
2107821030
var dataArea = this._els["dhx_cal_data"][0];
2107921031
dataArea.scrollTop = 0;

codebase/sources/dhtmlxscheduler.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/sources/dhtmlxscheduler.js

Lines changed: 21 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
})(this, function(exports2) {
44
"use strict";/** @license
55

6-
dhtmlxScheduler v.7.2.1 Standard
6+
dhtmlxScheduler v.7.2.2 Standard
77

88
To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com
99

@@ -82,6 +82,14 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
8282
setRequiredStylesToMarker(eventNode2, layout);
8383
const sections = {};
8484
let markerObject = { start_date: event3.start_date, end_date: event3.end_date, css: "dhx_scheduler_dnd_marker", html: eventNode2 };
85+
if (layout == "timeline") {
86+
const viewObj = scheduler2.getView(viewName);
87+
if (viewObj.round_position) {
88+
const index = scheduler2._get_date_index(viewObj, event3.start_date);
89+
const rounded_date = viewObj._trace_x[index];
90+
markerObject.start_date = rounded_date;
91+
}
92+
}
8593
if (layout == "timeline" || layout == "month") {
8694
markerObject = { ...markerObject, end_date: scheduler2.date.add(event3.start_date, 1, "minute") };
8795
}
@@ -9019,7 +9027,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
90199027
const dayElement = document.createElement("div");
90209028
dayElement.setAttribute("data-cell-date", scheduler2.templates.format_date(currDate));
90219029
dayElement.setAttribute("data-day", currDate.getDay());
9022-
dayElement.innerHTML = currDate.getDate();
9030+
dayElement.innerHTML = scheduler2.templates.month_day(currDate);
90239031
if (currDate.valueOf() < monthStart.valueOf()) {
90249032
dayElement.classList.add("dhx_before");
90259033
} else if (currDate.valueOf() >= monthEnd.valueOf()) {
@@ -9124,7 +9132,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
91249132
}
91259133
}
91269134
function factoryMethod(extensionManager) {
9127-
const scheduler2 = { version: "7.2.1" };
9135+
const scheduler2 = { version: "7.2.2" };
91289136
scheduler2.$stateProvider = StateService();
91299137
scheduler2.getState = scheduler2.$stateProvider.getState;
91309138
extend$n(scheduler2);
@@ -18564,6 +18572,10 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
1856418572
setPropsForFirstOccurrence(event2, occurrence);
1856518573
return scheduler2.showLightbox_rec(pid);
1856618574
}
18575+
if (scheduler2._isFirstOccurrence(occurrence)) {
18576+
setPropsForFirstOccurrence(event2, occurrence);
18577+
return scheduler2.showLightbox_rec(pid);
18578+
}
1856718579
const tempStart = new Date(event2.start_date);
1856818580
event2._end_date = event2.end_date;
1856918581
event2._start_date = tempStart;
@@ -18824,7 +18836,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
1882418836
if (!seriesExceptions) {
1882518837
seriesExceptions = {};
1882618838
}
18827-
from = toUTCDate(from || new Date(scheduler2._min_date.valueOf() - 1e3));
18839+
from = toUTCDate(from || new Date(scheduler2._min_date.valueOf() - 7 * 24 * 60 * 60 * 1e3));
1882818840
to = toUTCDate(to || new Date(scheduler2._max_date.valueOf() - 1e3));
1882918841
const utcStart = toUTCDate(ev.start_date);
1883018842
let parsedRRule;
@@ -18849,7 +18861,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
1884918861
const date = repeatedDates[i];
1885018862
let exception = seriesExceptions[date.valueOf()];
1885118863
if (exception) {
18852-
if (exception.deleted) {
18864+
if (exception.deleted || exception.end_date.valueOf() < scheduler2._min_date.valueOf()) {
1885318865
continue;
1885418866
} else {
1885518867
visibleCount++;
@@ -18861,6 +18873,9 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
1886118873
copy.start_date = date;
1886218874
copy.id = ev.id + "#" + Math.ceil(date.valueOf());
1886318875
copy.end_date = new Date(date.valueOf() + eventDuration * 1e3);
18876+
if (copy.end_date.valueOf() < scheduler2._min_date.valueOf()) {
18877+
continue;
18878+
}
1886418879
copy.end_date = scheduler2._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);
1886518880
copy._timed = scheduler2.isOneDayEvent(copy);
1886618881
if (!copy._timed && !scheduler2._table_view && !scheduler2.config.multi_day)
@@ -18877,7 +18892,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
1887718892
for (let a in seriesExceptions) {
1887818893
let exception = seriesExceptions[a];
1887918894
if (exception) {
18880-
if (exception.deleted) {
18895+
if (exception.deleted || exception.end_date.valueOf() < scheduler2._min_date.valueOf()) {
1888118896
continue;
1888218897
} else if (from && to && exception.start_date < to && exception.end_date > from) {
1888318898
stack.push(exception);
@@ -21015,69 +21030,6 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
2101521030
scheduler2._hideToolTip();
2101621031
}
2101721032
};
21018-
scheduler2._reset_year_scale = function() {
21019-
this._cols = [];
21020-
this._colsS = {};
21021-
var week_starts = [];
21022-
var dataArea = this._els["dhx_cal_data"][0];
21023-
var c = this.config;
21024-
dataArea.scrollTop = 0;
21025-
dataArea.innerHTML = "";
21026-
Math.floor((parseInt(dataArea.style.height) - scheduler2.xy.year_top) / c.year_y);
21027-
var week_template = document.createElement("div");
21028-
var dummy_date = this.date.week_start(scheduler2._currentDate());
21029-
this._process_ignores(dummy_date, 7, "day", 1);
21030-
for (var i = 0; i < 7; i++) {
21031-
if (!(this._ignores && this._ignores[i])) {
21032-
this._cols[i] = "var(--dhx-scheduler-datepicker-cell-size)";
21033-
this._render_x_header(i, 0, dummy_date, week_template);
21034-
}
21035-
dummy_date = this.date.add(dummy_date, 1, "day");
21036-
}
21037-
week_template.lastChild.className += " dhx_scale_bar_last";
21038-
for (var i = 0; i < week_template.childNodes.length; i++) {
21039-
this._waiAria.yearHeadCell(week_template.childNodes[i]);
21040-
}
21041-
var sd = this.date[this._mode + "_start"](this.date.copy(this._date));
21042-
var ssd = sd;
21043-
var yearBox = null;
21044-
const wrapper = document.createElement("div");
21045-
wrapper.classList.add("dhx_year_wrapper");
21046-
for (var i = 0; i < c.year_y; i++) {
21047-
for (var j = 0; j < c.year_x; j++) {
21048-
yearBox = document.createElement("div");
21049-
yearBox.className = "dhx_year_box";
21050-
yearBox.setAttribute("date", this._helpers.formatDate(sd));
21051-
yearBox.setAttribute("data-month-date", this._helpers.formatDate(sd));
21052-
yearBox.innerHTML = "<div class='dhx_year_month'></div><div class='dhx_year_grid'><div class='dhx_year_week'>" + week_template.innerHTML + "</div><div class='dhx_year_body'></div></div>";
21053-
var header = yearBox.querySelector(".dhx_year_month");
21054-
var grid = yearBox.querySelector(".dhx_year_grid");
21055-
var body = yearBox.querySelector(".dhx_year_body");
21056-
var headerId = scheduler2.uid();
21057-
this._waiAria.yearHeader(header, headerId);
21058-
this._waiAria.yearGrid(grid, headerId);
21059-
header.innerHTML = this.templates.year_month(sd);
21060-
var dd = this.date.week_start(sd);
21061-
this._reset_month_scale(body, sd, dd, 6);
21062-
var days = body.querySelectorAll("td");
21063-
for (var day = 0; day < days.length; day++) {
21064-
this._waiAria.yearDayCell(days[day]);
21065-
}
21066-
wrapper.appendChild(yearBox);
21067-
week_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;
21068-
sd = this.date.add(sd, 1, "month");
21069-
}
21070-
}
21071-
dataArea.appendChild(wrapper);
21072-
var dateElement = this._getNavDateElement();
21073-
if (dateElement) {
21074-
dateElement.innerHTML = this.templates[this._mode + "_date"](ssd, sd, this._mode);
21075-
}
21076-
this.week_starts = week_starts;
21077-
week_starts._month = ssd.getMonth();
21078-
this._min_date = ssd;
21079-
this._max_date = sd;
21080-
};
2108121033
scheduler2._reset_year_scale = function() {
2108221034
var dataArea = this._els["dhx_cal_data"][0];
2108321035
dataArea.scrollTop = 0;

codebase/sources/dhtmlxscheduler.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)