Make event end date optional with sensible defaults #27

Closed
opened 2026-04-27 06:57:17 +00:00 by padreug · 0 comments
Owner

Problem

When creating an event, users must specify both start and end dates. For simple single-day events ("Concert on July 20th"), requiring an end date is friction. NIP-52 makes end optional — if omitted, clients should treat the event as ending at the end of the start date (for date-based) or after a reasonable duration (for time-based).

Proposed behavior

Date-based events (kind 31922):

  • End date optional — if omitted, defaults to same day as start date
  • NIP-52 spec: "If omitted, the calendar event ends on the same date"

Time-based events (kind 31923):

  • End time optional — if omitted, default to start + 2 hours (common convention)
  • Or let user pick a duration (1h, 2h, 3h, all day) instead of an explicit end time

Files to modify

  • src/modules/activities/components/CreateEventDialog.vue — make end date optional in form schema
  • src/modules/activities/types/ticket.ts — make event_end_date optional in CreateEventRequest
  • Backend: ~/dev/shared/extensions/events/models.py — make event_end_date optional in CreateEvent model, default to start date if not provided
## Problem When creating an event, users must specify both start and end dates. For simple single-day events ("Concert on July 20th"), requiring an end date is friction. NIP-52 makes `end` optional — if omitted, clients should treat the event as ending at the end of the start date (for date-based) or after a reasonable duration (for time-based). ## Proposed behavior **Date-based events (kind 31922):** - End date optional — if omitted, defaults to same day as start date - NIP-52 spec: "If omitted, the calendar event ends on the same date" **Time-based events (kind 31923):** - End time optional — if omitted, default to start + 2 hours (common convention) - Or let user pick a duration (1h, 2h, 3h, all day) instead of an explicit end time ## Files to modify - `src/modules/activities/components/CreateEventDialog.vue` — make end date optional in form schema - `src/modules/activities/types/ticket.ts` — make `event_end_date` optional in `CreateEventRequest` - Backend: `~/dev/shared/extensions/events/models.py` — make `event_end_date` optional in `CreateEvent` model, default to start date if not provided
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/webapp#27
No description provided.