@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.41 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 * as e from "react";
import { useInternationalization as f } from "@progress/kendo-react-intl";
import { classNames as u } from "@progress/kendo-react-common";
const d = e.forwardRef((t, m) => {
const { as: n = l.as, ...s } = t, a = e.useRef(null), r = e.useRef(null), o = f(), c = e.useMemo(
() => u("k-scheduler-cell k-heading-cell", t.className),
[t.className]
);
return e.useImperativeHandle(r, () => ({
element: a.current && a.current.element ? a.current.element : a.current,
props: t
})), e.useImperativeHandle(m, () => r.current), /* @__PURE__ */ e.createElement(
n,
{
ref: n !== l.as ? void 0 : a,
...s,
className: c
},
o.formatDate(t.date, t.format ? t.format : l.format)
);
}), l = {
as: e.forwardRef(({ as: t, format: m, start: n, end: s, ...a }, r) => /* @__PURE__ */ e.createElement("div", { ...a, ref: r })),
format: "t"
};
d.displayName = "KendoReactSchedulerTimeHeaderCell";
export {
d as TimeHeaderCell,
l as timeHeaderCellDefaultProps
};