-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed date issue #532
fixed date issue #532
Conversation
✅ Deploy Preview for taupe-cendol-f7e2bb ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Pranjalidhale0711! Thank you for your valuable contribution! Our team will review it and get back to you soon.
@Pranjalidhale0711 have you raised an issue before making the PR ??? |
Yes sir I have raised an issue before PR. Following is the issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pranjalidhale0711 Please don't make any type of PR until & unless you get assigned to any issue .I am closing this PR as unplanned . Now I have assigned you . Now you can submit your PR
@Pranjalidhale0711 & also please follow the proper PR template next time |
Ok sir |
Changes Implemented
Date Validation: Added JavaScript validation to ensure the end date cannot be earlier than the start date.
Alert Message: Displays an alert if the end date is earlier than the start date, preventing form submission.
Form Submission: The form's submit event is intercepted to perform the date check before proceeding.
Purpose
This change ensures that users cannot select an end date that is before the start date, which would be logically incorrect for planning a trip.
Details
JavaScript Function:
Created a handleSubmit function that performs the date comparison.
If the end date is earlier than the start date, an alert is shown to the user and the form submission is prevented.
If the dates are valid, the form can be submitted successfully.
Event Listener:
Added an event listener to the form's submit event to call the handleSubmit function.
[