datepicker change on index assignment