UNPKG

ng-mat-daterange-picker

Version:

[![CircleCI](https://circleci.com/gh/ashishgkwd/ngx-mat-daterange-picker.svg?style=shield)](https://circleci.com/gh/ashishgkwd/ngx-mat-daterange-picker) [![Maintainability](https://api.codeclimate.com/v1/badges/2b0d09a866f6d2ed139c/maintainability)](https

25 lines (20 loc) 622 B
import { Injectable } from '@angular/core'; import { NgxDrpOptions } from '../model/model'; @Injectable() export class ConfigStoreService { private _ngxDrpOptions: NgxDrpOptions; private defaultOptions = { excludeWeekends: false, animation: true, locale: 'en-US', fromMinMax: { fromDate: null, toDate: null }, toMinMax: { fromDate: null, toDate: null } }; constructor() {} get ngxDrpOptions(): NgxDrpOptions { return this._ngxDrpOptions; } set ngxDrpOptions(options: NgxDrpOptions) { this._ngxDrpOptions = { ...this.defaultOptions, ...options }; } }