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

Suggestion! Throw change event when a new date is picked in date picker #67

Open
AhlawatAnup opened this issue Jan 27, 2024 · 4 comments

Comments

@AhlawatAnup
Copy link
Contributor

Hey, Thanks for the so good and simple library. Contributing the same ....
If you want to report the event when the new date is picked in the input box . Add these two lines in "jsCalendar.datepicker.js"
at line 343

const event = new Event('change', { bubbles: true });
this._target.dispatchEvent(event);

and will throw the 'change' event whenever the new date is picked

and then the input box change can be listened.

Happy coding..
Thanks

@Chris53897
Copy link

@AhlawatAnup Can you please provide a PR, to make it easier for the maintainer?

@GramThanos
Copy link
Owner

GramThanos commented Feb 15, 2024

@AhlawatAnup thank you for the suggestion, it will be a nice improvement. Just FYI, I have seen your message but due to work load I am not able to work on it at this time.

It would be awesome if someone can create a PR as @Chris53897 suggested.

@AhlawatAnup
Copy link
Contributor Author

@GramThanos @Chris53897 Thanks for the reply. I will Provide a PR by today.

@GramThanos
Copy link
Owner

PR merged. I will leave this issue open for now, allowing everyone to do some testing before closing it.

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

No branches or pull requests

3 participants