TimeGridEventDragUtils.js 624 B

123456789101112131415161718192021222324
  1. import * as EventDragUtils from './EventDragUtils'
  2. import { computeSpanRects } from '../event-render/TimeGridEventRenderUtils'
  3. export function drag(startDate, endDate, debug) {
  4. startDate = $.fullCalendar.moment.parseZone(startDate)
  5. endDate = $.fullCalendar.moment.parseZone(endDate)
  6. var startRect = computeSpanRects(
  7. startDate,
  8. startDate.clone().add({ minutes: 30 }) // hardcoded 30 minute slot :(
  9. )[0]
  10. var endRect = computeSpanRects(
  11. endDate,
  12. endDate.clone().add({ minutes: 30 }) // hardcoded 30 minute slot :(
  13. )[0]
  14. return EventDragUtils.drag(
  15. startRect,
  16. endRect,
  17. debug
  18. )
  19. }