ngx-tempusdominus-bootstrap-tbk
Version:
Angular2+ directive for tempus dominus bootstrap library.
26 lines (22 loc) • 738 B
text/typescript
import { Component, OnInit } from '@angular/core';
import * as moment from 'moment';
export class LinkedDatepickersComponent implements OnInit {
startDate = moment('2015-11-18T00:00Z');
endDate = moment('2015-11-20T00:00Z');
startOptions: any = {format: 'DD.MM.YYYY', locale: 'fr'};
endOptions: any = {format: 'DD.MM.YYYY'};
constructor() { }
ngOnInit() {
this.endOptions.minDate = this.startDate;
this.startOptions.maxDate = this.endDate;
}
update() {
this.startOptions.maxDate = this.endDate;
this.endOptions.minDate = this.startDate;
}
}