Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

Pranjalidhale0711
Copy link

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.

[
Screenshot 2024-05-21 at 9 15 01 PM

Copy link

netlify bot commented May 21, 2024

Deploy Preview for taupe-cendol-f7e2bb ready!

Name Link
🔨 Latest commit c153f34
🔍 Latest deploy log https://app.netlify.com/sites/taupe-cendol-f7e2bb/deploys/664cc4240b15540009e04527
😎 Deploy Preview https://deploy-preview-532--taupe-cendol-f7e2bb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@github-actions github-actions bot left a 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.

@apu52
Copy link
Owner

apu52 commented May 21, 2024

@Pranjalidhale0711 have you raised an issue before making the PR ???
As no issue is mentioned in the PR

@apu52 apu52 added the help wanted Extra attention is needed label May 21, 2024
@Pranjalidhale0711
Copy link
Author

Yes sir I have raised an issue before PR.

Following is the issue
End Date Can Be Set Earlier Than Start Date #523

Copy link
Owner

@apu52 apu52 left a 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

@apu52
Copy link
Owner

apu52 commented May 21, 2024

@Pranjalidhale0711 & also please follow the proper PR template next time

@apu52 apu52 closed this May 21, 2024
@apu52 apu52 added wontfix This will not be worked on and removed help wanted Extra attention is needed labels May 21, 2024
@Pranjalidhale0711
Copy link
Author

Ok sir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants