Fixing setValidity in datePicker directive