Skip to content

Commit

Permalink
feat(material): add dateInput and dateChange options to datepic… (#2132)
Browse files Browse the repository at this point in the history
fix #2127
  • Loading branch information
aitboudad committed Mar 17, 2020
1 parent bbd7009 commit 666e960
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/material/datepicker/src/datepicker.type.ts
Expand Up @@ -18,7 +18,9 @@ import { MatDatepickerInput } from '@angular/material/datepicker';
[formlyAttributes]="field"
[placeholder]="to.placeholder"
[tabindex]="to.tabindex || 0"
[readonly]="to.readonly">
[readonly]="to.readonly"
(dateInput)="to.datepickerOptions.dateInput(field, $event)"
(dateChange)="to.datepickerOptions.dateChange(field, $event)">
<ng-template #datepickerToggle>
<mat-datepicker-toggle [for]="picker"></mat-datepicker-toggle>
</ng-template>
Expand All @@ -40,6 +42,8 @@ export class FormlyDatepickerTypeComponent extends FieldType implements AfterVie
datepickerOptions: {
startView: 'month',
datepickerTogglePosition: 'suffix',
dateInput: () => {},
dateChange: () => {},
},
},
};
Expand Down

0 comments on commit 666e960

Please sign in to comment.