get first and last date of current month using ngbcalendar

  angular,, typescript

below is my code. I want current month first and last date only.

 constructor(private calendar: NgbCalendar, public formatter: NgbDateParserFormatter) {
    this.fromDate = calendar.getToday();//start date here
    this.toDate = calendar.getNext(calendar.getToday(), 'd', 30);//end date here

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.