datepicker & resetObject function fixes