datepicker validation fix