Skip to content

Commit

Permalink
feat(stark-ui): date-picker - add support for ControlValueAccessor an…
Browse files Browse the repository at this point in the history
…d Validator

ISSUES CLOSED: #1146

BREAKING CHANGE: stark-date-picker now integrates ControlValueAccessor and Validator:

  - The following Input have been changed:
      - **date** is now **value**
      - **isDisabled** is now **disabled**
  - The output **dateChanged** is now **dateChange**
  - **dateInput** Output has been added and now the date-picker Input/Output are
    similar to the ones of MatDatepicker component
  • Loading branch information
SuperITMan committed Mar 7, 2019
1 parent 50e9bbe commit d150546
Show file tree
Hide file tree
Showing 22 changed files with 747 additions and 171 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
<mat-form-field [id]="pickerId">
<input
matInput
[disabled]="isDisabled"
[id]="pickerId + '-input'"
[matDatepicker]="picker"
(dateInput)="onDateInput($event)"
(dateChange)="onDateChange($event)"
[placeholder]="label | translate"
[matDatepickerFilter]="dateFilterFnWrapper"
[min]="minDate"
[max]="maxDate"
[name]="pickerName"
[value]="date"
(dateChange)="onDateChange($event)"
[required]="required"
[formControl]="formControl"
/>
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker [id]="pickerId" #picker></mat-datepicker>

<mat-error>
<div>
<ng-content></ng-content>
</div>
</mat-error>
</mat-form-field>
Loading

0 comments on commit d150546

Please sign in to comment.