core/dynamic-forms/date/date.type.component.ts
FieldType
changeDetection | ChangeDetectionStrategy.OnPush |
selector | c8y-field-date |
templateUrl | ./date.type.component.html |
Properties |
|
Static Readonly CONFIG |
Type : ConfigOption
|
Default value : {
types: [
{
name: 'date',
component: FieldDate
}
]
}
|
<div class="form-group" [attr.aria-labelledby]="id + '-fieldset'">
<label id="{{ id + '-fieldset' }}" *ngIf="to.label || to.description">
{{ to.label | humanize}}
<button
*ngIf="to.description"
class="btn-clean text-14 m-l-4"
[popover]="to.description"
placement="right"
outsideClick="true"
type="button"
>
<i c8yIcon="question-circle-o" class="text-info"></i>
</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>