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)
}
}
});
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?