UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

18 lines (17 loc) 812 B
/** * DevExtreme (esm/__internal/scheduler/appointments/data_provider/m_utils.js) * Version: 25.1.4 * Build date: Tue Aug 05 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import dateUtils from "../../../../core/utils/date"; export const getAppointmentTakesSeveralDays = dates => !dateUtils.sameDate(dates.startDate, dates.endDate); export const sortAppointmentsByStartDate = (appointments, dataAccessors) => { appointments.sort(((a, b) => { const firstDate = dataAccessors.get("startDate", a.settings || a); const secondDate = dataAccessors.get("startDate", b.settings || b); return Math.sign(firstDate.getTime() - secondDate.getTime()) })) };