changes to date onchange evnet code - reduces unwanted additional onchange calls