Fixed bug with set date when onChange event has been called