core/dynamic-forms/date/date.type.component.ts
FieldType
changeDetection | ChangeDetectionStrategy.OnPush |
selector | c8y-field-date |
templateUrl | ./date.type.component.html |
<div class="form-group" [attr.aria-labelledby]="id + '-fieldset'">
<label id="{{ id + '-fieldset' }}" *ngIf="to.label || to.description">
{{ to.label | humanize }}
<button
class="btn-help btn-help--sm"
type="button"
[attr.aria-label]="'Help' | translate"
[popover]="to.description"
placement="right"
triggers="focus"
*ngIf="to.description"
></button>
</label>
<div class="form-group datepicker">
<input
[formControl]="formControl"
[formlyAttributes]="field"
class="form-control"
placeholder="Date"
[bsConfig]="{ customTodayClass: 'today', dateInputFormat: 'YYYY-MM-DD' }"
[placeholder]="'Select a date…' | translate"
placement="top"
bsDatepicker
[required]="to.required"
/>
</div>
</div>