Readd function that had gone missing in refactoring.

This commit is contained in:
Leo Vasanko 2025-08-25 19:55:27 -06:00
parent e50f90f277
commit 1169d6cc15

View File

@ -193,6 +193,17 @@ function finalizeDragAndCreate() {
removeGlobalTouchListeners()
}
// Build a minimal event creation payload from current selection
// Returns null if selection is invalid or empty.
function createEventFromSelection() {
const sel = selection.value || {}
if (!sel.startDate || !sel.dayCount || sel.dayCount <= 0) return null
return {
startDate: sel.startDate,
dayCount: sel.dayCount,
}
}
function getDateUnderPoint(x, y) {
const el = document.elementFromPoint(x, y)
let cur = el