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

Change event ordering #199

Open
stell opened this issue Feb 6, 2017 · 0 comments
Open

Change event ordering #199

stell opened this issue Feb 6, 2017 · 0 comments

Comments

@stell
Copy link

stell commented Feb 6, 2017

I got a problem when submitting a form which includes a picker.
After selecting a date the form always submits with the date picket beforehand.
What?? So in this minified example the first log outputs the picked date, but the second outputs the previously picked date. I need to post the form with the picked date of the element #picker.

How can i do that?

cal = new Kalendae.Input("picker", {
	selected: Kalendae.moment(),
	mode:'single',
    subscribe: {
      'change': function (date) {
          console.log(date, this.getSelected());
          console.log($('#picker').val());

          // call a js function which submits the form using the picked date value (not the previously picked one)
       }
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant