### File

`src/components/fsdatepickerpresets/fsdatepickerpresets.component.ts`

### Implements

`OnInit`

### Metadata

selector | `fsDatePickerPresets`
styleUrls | `fsdatepickerpresets.component.scss`
templateUrl | `./fsdatepickerpresets.component.html`

### Index

###### Properties
Public presets
###### Methods
ngOnInit setPreset
###### Outputs
datesChange

### Constructor

`constructor(fsDatePickerModel: FsDatePickerModel)`
Parameters :
Name | Type | Optional | Description
fsDatePickerModel | `FsDatePickerModel` | no |

### Outputs

`datesChange` | `$event` type: `EventEmitter`

### Methods

ngOnInit
`ngOnInit()`
Returns : `void`

setPreset
`setPreset(preset: FsPreset)`
Parameters :
Name | Type | Optional | Default value | Description
preset | `FsPreset` | no | `` |
Returns : `void`

### Properties

Public presets
`presets: `FsPreset[]``
Type : `FsPreset[]`
Default value : `[]`

    <div *ngIf="presets.length" class="presets">
      <ng-container *ngFor="let item of presets; let i = index">
        <a (click)="setPreset(item)" *ngIf="i < 4">{{ item.name }}</a>
      </ng-container>
      <ng-container *ngIf="presets.length > 4">
        <button mat-icon-button [matMenuTriggerFor]="presetsMenu">
          <mat-icon>more_horiz</mat-icon>
        </button>
        <mat-menu #presetsMenu="matMenu" [overlapTrigger]="false">
          <ng-container *ngFor="let item of presets; let i = index">
            <button mat-menu-item (click)="setPreset(item)" *ngIf="i >= 4">{{ item.name }}</button>
          </ng-container>
        </mat-menu>
      </ng-container>
    </div>

Legend
Html element
Component
Html element with directive

# results matching ""

# No results matching ""