mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 11:59:39 +02:00
fix(calendar): use 1-hour default duration for grid click instead of 15 minutes
The click-to-create handler was using SNAP_INTERVAL_MINUTES (15) as the initial event duration. Now uses DEFAULT_EVENT_DURATION_MINUTES (60) to match the configured default. Drag behavior still uses snap interval. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b51f18a910
commit
c3927c85f8
1 changed files with 5 additions and 2 deletions
|
|
@ -3,7 +3,10 @@
|
|||
* Handles click-and-drag on the calendar grid to create new events
|
||||
*/
|
||||
|
||||
import { SNAP_INTERVAL_MINUTES } from '$lib/utils/calendarConstants';
|
||||
import {
|
||||
SNAP_INTERVAL_MINUTES,
|
||||
DEFAULT_EVENT_DURATION_MINUTES,
|
||||
} from '$lib/utils/calendarConstants';
|
||||
|
||||
export interface DragToCreateConfig {
|
||||
containerEl: HTMLElement | null;
|
||||
|
|
@ -95,7 +98,7 @@ export function useDragToCreate(getConfig: () => DragToCreateConfig) {
|
|||
hasMoved = false;
|
||||
createTargetDay = day;
|
||||
createStartMinutes = snappedMinutes;
|
||||
createEndMinutes = snappedMinutes + snap;
|
||||
createEndMinutes = snappedMinutes + DEFAULT_EVENT_DURATION_MINUTES;
|
||||
|
||||
updatePreview();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue