@progress/kendo-vue-dateinputs
Version:
47 lines (46 loc) • 1.96 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { cloneDate as c, getDate as u } from "@progress/kendo-date-math";
import { EMPTY_SELECTIONRANGE as g } from "./calendar/models/SelectionRange.mjs";
const f = (e, t, o) => t === void 0 || o === void 0 || t <= e && e <= o ? e : e < t ? t : o, l = new Date(1980, 0, 1), E = new Date(1900, 0, 1), M = new Date(2099, 11, 31), T = new Date(1980, 0, 1), p = new Date(1980, 0, 1, 23, 59, 59), w = (e, t) => {
const o = c(e);
return o.setHours(
t.getHours(),
t.getMinutes(),
t.getSeconds(),
t.getMilliseconds()
), o;
}, N = () => u(/* @__PURE__ */ new Date()), A = (e, t, o) => !e || !(t && t > e || o && o < e), R = (e, t, o) => e === null || !(t && u(t) > u(e) || o && u(o) < u(e)), _ = (e, t) => {
const { start: o, end: s } = t || g;
return !o || !s ? !1 : o < e && e < s;
}, H = (e, t, o = 1) => {
const s = [];
for (let n = e; n < t; n = n + o)
s.push(n);
return s;
}, i = (e, t) => e.slice(t).concat(e.slice(0, t)), y = (e, t, o) => e && (t && e < t ? c(t) : o && e > o ? c(o) : e), C = (e) => (t, o = "", s = {}) => {
const n = document.createElement(e);
return n.className = o, Object.keys(s).map((r) => n.style[r] = s[r]), typeof t == "string" ? n.innerHTML = t || "" : (t || []).forEach((r) => r && n.appendChild(r)), n;
};
export {
M as MAX_DATE,
p as MAX_TIME,
l as MIDNIGHT_DATE,
E as MIN_DATE,
T as MIN_TIME,
y as dateInRange,
C as domContainerFactory,
N as getToday,
R as isInDateRange,
A as isInRange,
_ as isInSelectionRange,
H as range,
w as setTime,
i as shiftWeekNames,
f as viewInRange
};