LP1822414 Ang date select readOnly & fixes
[Evergreen.git] / Open-ILS / src / eg2 / src / app / share / date-select / date-select.component.html
1 <ng-container *ngIf="readOnly">
2   {{initialDate | formatValue:'timestamp'}}
3 </ng-container>
4 <ng-container *ngIf="!readOnly">
5   <div class="input-group eg-date-select form-validated">
6     <input 
7       class="form-control"
8       type="text"
9       ngbDatepicker
10       #datePicker="ngbDatepicker"
11       [attr.id]="domId.length ? domId : null"
12       placeholder="yyyy-mm-dd"
13       class="form-control"
14       container="body"
15       name="{{fieldName}}"
16       [disabled]="disabled"
17       [required]="required"
18       [(ngModel)]="current"
19       (keyup.enter)="onDateEnter()"
20       (dateSelect)="onDateSelect($event)"/>
21     <div class="input-group-append">
22       <button class="btn btn-outline-secondary" [disabled]="disabled"
23         (click)="datePicker.toggle()" type="button">
24         <span title="Select Date" i18n-title
25           class="material-icons mat-icon-in-button">calendar_today</span>
26       </button>
27     </div>
28   </div>
29 </ng-container>