This bugfix causes the "onchange" event of elem to fire if datepicker modifies the value

Previously, no "onchange" event was fired by the element if the date was
changed in the datepicker gui. This modification now fires the onchange
event if the data is changed by datepicker.