File

src/lib/cells/date-cell/date-cell.component.ts

Metadata

Index

Inputs

Inputs

format
Type : string
Default value : 'dd.MM.yyyy HH:mm'
rxap-date-cell
Type : Date | number | string | null
Default value : null
import {
  ChangeDetectionStrategy,
  Component,
  Input,
} from '@angular/core';
import {
  DatePipe,
  NgIf,
} from '@angular/common';

@Component({
    // eslint-disable-next-line @angular-eslint/component-selector
    selector: 'td[rxap-date-cell]',
    templateUrl: './date-cell.component.html',
    styleUrls: ['./date-cell.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush,
    imports: [NgIf, DatePipe]
})
export class DateCellComponent {

  @Input('rxap-date-cell')
  public date: Date | number | string | null = null;

  @Input()
  public format = 'dd.MM.yyyy HH:mm';

}
<ng-template [ngIf]="date">
  {{date | date:format}}
</ng-template>
<ng-content></ng-content>

./date-cell.component.scss

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""