As of the moment , we can't use jQuery.ui.datepicker and Bacon.$.textFieldValue on the same input element as follows:
var dateinput = $("#date")
dateinput.datepicker()
Bacon.$.textFieldValue(dateinput).onValue(function(){
// something
});
... simply because textFieldValue does not listen to 'change' events on the text input, and fails to notice as the datepicker modifies the value of the input element.
The proposal
The problem above can be easily fixed by adding 'change' event to this line:
events = element.asEventStream("keyup input")
The fix above also will increase the interoperability with libraries other than jQuery.ui.
What's the problem?
As of the moment , we can't use
jQuery.ui.datepicker
andBacon.$.textFieldValue
on the same input element as follows:... simply because
textFieldValue
does not listen to 'change' events on the text input, and fails to notice as the datepicker modifies the value of the input element.The proposal
The problem above can be easily fixed by adding 'change' event to this line:
The fix above also will increase the interoperability with libraries other than
jQuery.ui
.