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

will it trigger any event on month change ? #2

Open
jango07 opened this issue Feb 20, 2020 · 1 comment
Open

will it trigger any event on month change ? #2

jango07 opened this issue Feb 20, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@jango07
Copy link

jango07 commented Feb 20, 2020

I am making use of the smart calendar in my application.
Whenever we move from one month to another i want to populate the disabled dates in my calendar based on the selected month.
Is there any event which gets trigered on left and right arrow button click ?
image

Thanks
Jango

@hristofor-jqwidgets
Copy link

Hi jango07,
currently there's is no specific event for month navigation, but you can listen to 'click' event and check if the target has the class smart-arrow-right or smart-arrow-left and execute your code depedning on the direction:

window.onload = function () {
    const calendar = document.querySelector('smart-calendar');

 calendar.addEventListener('click', function (event) {
       alert(event.target.classList.toString);
    });
}

Thank you for your feedback! Your suggestion for a new custom event on month navigation is convenient and will be added as a new feature request for the next release of the element.

@hristofor-jqwidgets hristofor-jqwidgets added the enhancement New feature or request label Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants