UNPKG

@event-calendar/core

Version:

Full-sized drag & drop event calendar with resource & timeline views

20 lines (17 loc) 481 B
import {createDate, setMidnight} from './date.js'; export function createDateRange(input) { let start, end; if (input) { ({start, end} = input); if (start) { start = setMidnight(createDate(start)); } if (end) { end = setMidnight(createDate(end)); } } return {start, end}; } export function outsideRange(date, range) { return range.start && date < range.start || range.end && date > range.end; }