Question

I'm using mobiscroll 1.6 (https://github.com/acidb/mobiscroll) for a date input in a simple html form that I ajaxify with jQuery Form (and http://jquery.malsup.com/form/)

I want the form to be posted when a change is made on the datefield. I tried both onSelect and onClose from the mobiscroll api:

http://docs.mobiscroll.com/

But the problem is that mobiscroll seems to set ALL input fields to disabled in the containing form until it is entirely done. When the input fields are disabled jQuery form doesn't serialize it:

http://jquery.malsup.com/form/#faq http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2

Adding a event handler on the input-field itself is not an option since it is initialized with JS from the start and I therefore get triggers on page load. I really need to trigger the ajax post from the datepicker.

Any tips are highly appreciated!

Was it helpful?

Solution

What version are you using? As of 2.0rc1 this is fixed for onSelect and onCancel events. On onClose the popup is not yet hidden, so if your function returns false, close will be prevented. For your use case I recommend 2.0rc3 and the onSelect event. See more details of this issue here: https://groups.google.com/forum/?fromgroups&hl=en#!topic/mobiscroll/fQQ-jYkH-qk

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top