fixed invalid date error - need to change format for datepicker