-
Notifications
You must be signed in to change notification settings - Fork 126
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
onChange fires before setting the date #124
Comments
Can you provide a sample code? |
As the calendar has been merged into Fomantic-UI, this issue is further discussed in fomantic/Fomantic-UI#417 |
Fixed and prepared for Fomantic-UI 2.8.0 by fomantic/Fomantic-UI#982 |
A workaround for those who still use semantic could be this:
|
Title pretty much sums it up. The onChange function is called before the changes are applied.
Example: whenever the date is changed I'd like to do stuff with the value of that date. So, naturally, I'd do this in the onChange function, retrieving the date with $('#mycalendar').calendar('get date'). However, when I do this, I get null initially and the previous value on consecutive changes.
onChange: function() {
console.log('change triggered');
console.log('current value ' + $('#endDate').val());
}
-result:
second change
result:
Is this behaviour intentional and if it is, why?! Why would I want to trigger an onChange function before I've done the changes? Or am I missing something obvious?
The text was updated successfully, but these errors were encountered: