devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
32 lines (31 loc) • 1.06 kB
JavaScript
/**
* DevExtreme (cjs/__internal/scheduler/view_model/common/is_appointment_matched_intervals.js)
* Version: 25.2.7
* Build date: Tue May 05 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isAppointmentMatchedIntervals = void 0;
const isAppointmentMatchedIntervals = (_ref, intervals) => {
let {
startDate: startDate,
endDate: endDate
} = _ref;
const intersectionIntervalIndex = intervals.findIndex(_ref2 => {
let {
max: max
} = _ref2;
return startDate < max
});
if (-1 === intersectionIntervalIndex) {
return false
}
const intervalStartDate = intervals[intersectionIntervalIndex].min;
return startDate >= intervalStartDate || endDate > intervalStartDate
};
exports.isAppointmentMatchedIntervals = isAppointmentMatchedIntervals;