Act on datepicker dom events

I am working on a widget for which I need to act on the Change/Input html dom event of the datepicker it's input field. For any other inputs like input, radio, checkbox, et cetera it works fine, but none of the datepickers seems to trigger this. i tried the default datepicker (dijit) and also the appstore versions (bootstrap, jquery) but with the same results. i noticed that one of the appstore modules is using the Mendix client API '' to update the value of the input. So I also tried to subscribe using '' but subscriptions are not informed when the 'set' method is called? Only when I explicitly trigger the function it appears that my subscribers are being informed. Can it still be done with html dom events? Is trying to subscribe to changes with '' the way forward? Any other suggestions? 
2 answers

I think subscribing to changes on attributes is the way to go.

Be sure to subscribe to changes on the attribute specifically.
I use the snippet below in a custom date-time picker and it works perfectly.

                    guid: this._contextObj,
                    attr: this.dateAttribute,
                    callback: lang.hitch(this, this._setDatePicker)

It also listens to changes that I trigger using set() on the object in the client (without committing to the runtime).


Hope it helps!


Hi Alexander,


Not sure if this helps but as far as I know the only sets the value locally, meaning in the clients memory. This will cause the value to be updated if it is used in other client widgets. To send the data to the server use the (the name is a bit misleading since this does not cause an actual db commit, it just sends the data to mx runtime on the server). At least this is what I think is hapening while struggling with a similar issue (I have only tried this in mx version 6.5.1)


Hope this helps,