ani1609 / Spendwise

Spendwise - Your User-Friendly Expense Tracker
https://spendwise-seven.vercel.app/
MIT License
27 stars 50 forks source link

Prevent future dates in TransactionForm #324

Closed Anuj-Gill closed 6 months ago

Anuj-Gill commented 6 months ago

Pull Request

Related Issues: Issue number #323

Description:

  1. Addressed a bug that allowed users to select future dates in the TransactionForm, causing data inconsistencies.
  2. Implemented validation within the handleChange function to ensure only past or present dates are accepted.
  3. Added an error message to notify users when a future date is selected, guiding them to correct input.

Checklist:

Screenshots: When a future date is selected, the user get's this message! image

vercel[bot] commented 6 months ago

Someone is attempting to deploy a commit to a Personal Account owned by @ani1609 on Vercel.

@ani1609 first needs to authorize it.

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spendwise ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 6, 2024 7:43am
ani1609 commented 6 months ago

@Anuj-Gill the error message is getting displayed on setting the date from future. Please modify the code in a such a way that the error gets displayed only when the 'Add Transaction' or 'Edit Transaction' button is clicked

Anuj-Gill commented 6 months ago

@ani1609 Updated the code. Please have a look when possible.

ani1609 commented 6 months ago

@Anuj-Gill done