Skip to content

Avoid past dates in the expiration date DatePicker #53

Description

Prevent past dates in Expiration Date picker

Summary: Disallow selecting past dates in the Expiration Date DatePicker; only today and future dates are valid.

WHAT

  • Enforce min date = today on the Expiration Date field.
  • Block manual input of past dates (validation + UI feedback).
  • Show clear error/help text when an invalid date is attempted.

WHY

  • Prevents invalid inventory entries and downstream data issues.
  • Aligns with business rule: products cannot have past expiration.

Acceptance Criteria

  • User cannot select or type any date < today.
  • Attempting a past date shows inline validation and prevents submit.
  • Keyboard navigation respects the min date.
  • Existing records with past dates are unaffected (view-only).

Non-Goals

  • Changing other date fields or global date behavior.

QA Steps

  1. Open create/edit product form.
  2. Try picking yesterday → selection blocked, error shown.
  3. Pick today/tomorrow → no error; form can submit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions