Skip to content

[UX] Election Creation Fails Silently for Past Start Dates #210

@sai-suraj143

Description

@sai-suraj143

Description
The election creation form currently allows users to select a "Start Date" in the past. When submitting, the form fails silently: no election is created, but no error message or alert is shown to the user.

Steps to Reproduce

  1. Navigate to /create.
  2. Fill in valid Title and Description.
  3. Set "Start Date" to yesterday's date.
  4. Click "Create Election".

Actual Behavior
The button clicks, but nothing happens. No error toast or alert appears.

Expected Behavior
The system should validate that Start Date > Current Date and show a toast error: "Start time cannot be in the past."

Proposed Solution
Add a validation check in createElection function comparing startTime with new Date().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions