UNPKG

@progress/kendo-react-scheduler

Version:

React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package

37 lines (36 loc) 1.55 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as w from "react"; import { MultiDayView as p } from "../day/MultiDayView.mjs"; import { DAYS_IN_WEEK_COUNT as t } from "../../constants/index.mjs"; import { ZonedDate as r, firstDayInWeek as g, getDate as c, addDays as E } from "@progress/kendo-date-math"; import { weekViewTitle as i, messages as u } from "../../messages/index.mjs"; import { toUTCDateTime as m } from "../../utils/index.mjs"; const k = (e) => /* @__PURE__ */ w.createElement(p, { ...e, step: t, numberOfDays: t }), y = (e) => c(e), _ = (e, a) => c(E(e, a)), S = ({ intl: e, date: a, timezone: o }) => { const d = r.fromLocalDate(a, o), s = y(g(d, e.firstDay())), f = _(s, t), n = r.fromUTCDate(m(s), o), D = r.fromUTCDate(m(f), o), l = new Date(n.getTime()), T = new Date(D.getTime()); return { start: l, end: T, zonedStart: n, zonedEnd: D }; }, U = { name: "week", slotDuration: 60, slotDivisions: 2, numberOfDays: t, dateRange: S, title: (e) => e.toLanguageString(i, u[i]), selectedDateFormat: "{0:D} - {1:D}", selectedShortDateFormat: "{0:d} - {1:d}" }; k.displayName = "KendoReactSchedulerWeekView"; export { k as WeekView, U as weekViewDefaultProps };