File

datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-exports-selector-time-range/datapoints-exports-selector-time-range.component.ts

Implements

OnInit OnDestroy

Metadata

Index

Properties
Methods
Inputs
Outputs

Inputs

formGroup
Type : ReturnType<DatapointsExportSelectorFileExporterComponent['createForm']>
Required :  true

Outputs

onDateFromChange
Type : string
onDateToChange
Type : string

Methods

ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void

Properties

Readonly DATE_FROM
Type : string
Default value : 'dateFrom'
Readonly DATE_TO
Type : string
Default value : 'dateTo'
Readonly FROM_DATE
Type : unknown
Default value : gettext('From`date`')
Readonly HAS_ERROR
Type : unknown
Default value : HAS_ERROR
Readonly INVALID_DATE_TIME
Type : string
Default value : 'invalidDateTime'
Readonly THIS_DATE_IS_AFTER_THE_LAST_ALLOWED_DATE
Type : unknown
Default value : gettext( 'This date is after the latest allowed date.' )
Readonly THIS_DATE_IS_BEFORE_THE_EARLIEST_ALLOWED_DATE
Type : unknown
Default value : gettext( 'This date is before the earliest allowed date.' )
Readonly THIS_DATE_IS_INVALID
Type : unknown
Default value : gettext('This date is invalid.')
Readonly TO_DATE
Type : unknown
Default value : gettext('To`date`')
<fieldset class="c8y-fieldset">
  <legend>{{ 'Time range' | translate }}</legend>
  <c8y-form-group
    class="m-b-8 d-flex gap-4 a-i-center"
    [class]="formGroup().controls.dateFrom.errors ? HAS_ERROR : ''"
  >
    <label
      class="m-b-0"
      style="min-width: 120px"
      [title]="FROM_DATE | translate"
      [for]="DATE_FROM"
    >
      {{ FROM_DATE | translate }}
    </label>
    <div>
      <c8y-date-time-picker
        [class]="formGroup().controls.dateFrom.errors ? HAS_ERROR : ''"
        id="DATE_FROM"
        [maxDate]="formGroup().controls.dateTo.value ?? ''"
        [placeholder]="FROM_DATE | translate"
        [formControl]="formGroup().controls.dateFrom"
      ></c8y-date-time-picker>
      <c8y-messages [show]="formGroup().controls.dateFrom.errors ?? {}">
        <c8y-message
          name="dateAfterRangeMax"
          [text]="THIS_DATE_IS_AFTER_THE_LAST_ALLOWED_DATE | translate"
        ></c8y-message>
        <c8y-message
          name="INVALID_DATE_TIME"
          [text]="THIS_DATE_IS_INVALID | translate"
        ></c8y-message>
      </c8y-messages>
    </div>
  </c8y-form-group>
  <c8y-form-group
    class="m-b-8 d-flex gap-4 a-i-center"
    [class]="formGroup().controls.dateTo.errors ? HAS_ERROR : ''"
  >
    <label
      class="m-b-0"
      style="min-width: 120px"
      [title]="TO_DATE | translate"
      [for]="DATE_TO"
    >
      {{ TO_DATE | translate }}
    </label>
    <div>
      <c8y-date-time-picker
        [class]="formGroup().controls.dateTo.errors ? HAS_ERROR : ''"
        id="DATE_TO"
        [minDate]="formGroup().controls.dateFrom.value ?? ''"
        [placeholder]="TO_DATE | translate"
        [formControl]="formGroup().controls.dateTo"
      ></c8y-date-time-picker>
      <c8y-messages [show]="formGroup().controls.dateTo.errors ?? {}">
        <c8y-message
          name="dateBeforeRangeMin"
          [text]="THIS_DATE_IS_BEFORE_THE_EARLIEST_ALLOWED_DATE | translate"
        ></c8y-message>
        <c8y-message
          name="INVALID_DATE_TIME"
          [text]="THIS_DATE_IS_INVALID | translate"
        ></c8y-message>
      </c8y-messages>
    </div>
  </c8y-form-group>
</fieldset>

results matching ""

    No results matching ""