Skip to content

Commit

Permalink
resolves #159 (#162)
Browse files Browse the repository at this point in the history
* resolves #159

* lint fix
  • Loading branch information
vlio20 authored Aug 5, 2017
1 parent 40ea9d4 commit d6f0e92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/date-picker/date-picker.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ export class DatePickerDirective implements OnInit {
let setup = true;

this.datePicker.registerOnChange((value) => {
this.formControl.control.setValue(this.datePicker.inputElementValue);
if (value) {
this.formControl.control.setValue(this.datePicker.inputElementValue);
}
const errors = this.datePicker.validateFn(value);

if (!setup) {
Expand Down

0 comments on commit d6f0e92

Please sign in to comment.