@mantine/dates
Version:
Calendars, date and time pickers based on Mantine components
15 lines (14 loc) • 648 B
JavaScript
"use client";
import dayjs from "dayjs";
//#region packages/@mantine/dates/src/components/DateTimePicker/get-min-max-time/get-min-max-time.ts
function getMinTime({ minDate, value }) {
const minTime = minDate ? dayjs(minDate).format("HH:mm:ss") : null;
return value && minDate && value === minDate ? minTime != null ? minTime : void 0 : void 0;
}
function getMaxTime({ maxDate, value }) {
const maxTime = maxDate ? dayjs(maxDate).format("HH:mm:ss") : null;
return value && maxDate && value === maxDate ? maxTime != null ? maxTime : void 0 : void 0;
}
//#endregion
export { getMaxTime, getMinTime };
//# sourceMappingURL=get-min-max-time.mjs.map