I have a scenario where I use datetimepicker for inputting From and To dates. If I put a constraint in such a way that the "To" dates cannot be lesser than the "From" date, the bindings do not work anymore. Here is the fiddle: http://jsfiddle.net/ericpanorel/PkpP6/
Any ideas?
Datepicker will not fire change event in case you supplied onselect. Below is the piece from jquery ui code:
var onSelect = this._get(inst, 'onSelect');
if (onSelect)
onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
else if (inst.input)
inst.input.trigger('change'); // fire the change event
To solve you problem, update model in both onSelect (this will fire when user selected date from datepicker window) and 'onchange' (last one you still need to handle textbox editing
fiddle: