Reputation: 222682
I have configure moment with my angular2 application, and when i tried to assign the date of this week saturday to a date type variable,
case "weekend":
this.fromDate = moment().startOf('week');
It shows an error saying,
Type 'Moment' is not assignable to type 'Date'. Property 'toDateString' is missing in type 'Moment'
I have imported moment in my component as follows,
import * as moment from 'moment/moment';
Upvotes: 12
Views: 32570