Fixed Angular Material datepicker examples

This commit is contained in:
Sercan Yemen 2018-06-20 16:29:28 +03:00
parent 13746c2a73
commit ba2f50bf62
3 changed files with 10 additions and 6 deletions

View File

@ -9,9 +9,10 @@ import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/
// the `default as` syntax. // the `default as` syntax.
import * as _moment from 'moment'; import * as _moment from 'moment';
// tslint:disable-next-line:no-duplicate-imports // tslint:disable-next-line:no-duplicate-imports
import {default as _rollupMoment} from 'moment'; // import {default as _rollupMoment} from 'moment';
const moment = _rollupMoment || _moment; // const moment = _rollupMoment || _moment;
const moment = _moment;
// See the Moment.js docs for the meaning of these formats: // See the Moment.js docs for the meaning of these formats:
// https://momentjs.com/docs/#/displaying/format/ // https://momentjs.com/docs/#/displaying/format/

View File

@ -9,9 +9,10 @@ import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/
// the `default as` syntax. // the `default as` syntax.
import * as _moment from 'moment'; import * as _moment from 'moment';
// tslint:disable-next-line:no-duplicate-imports // tslint:disable-next-line:no-duplicate-imports
import {default as _rollupMoment} from 'moment'; // import {default as _rollupMoment} from 'moment';
const moment = _rollupMoment || _moment; // const moment = _rollupMoment || _moment;
const moment = _moment;
/** @title Datepicker that uses Moment.js dates */ /** @title Datepicker that uses Moment.js dates */
@Component({ @Component({

View File

@ -9,10 +9,12 @@ import {MatDatepicker} from '@angular/material/datepicker';
// syntax. However, rollup creates a synthetic default module and we thus need to import it using // syntax. However, rollup creates a synthetic default module and we thus need to import it using
// the `default as` syntax. // the `default as` syntax.
import * as _moment from 'moment'; import * as _moment from 'moment';
import { Moment } from 'moment';
// tslint:disable-next-line:no-duplicate-imports // tslint:disable-next-line:no-duplicate-imports
import {default as _rollupMoment, Moment} from 'moment'; // import {default as _rollupMoment, Moment} from 'moment';
const moment = _rollupMoment || _moment; // const moment = _rollupMoment || _moment;
const moment = _moment;
// See the Moment.js docs for the meaning of these formats: // See the Moment.js docs for the meaning of these formats:
// https://momentjs.com/docs/#/displaying/format/ // https://momentjs.com/docs/#/displaying/format/