MikeDiam
MikeDiam

Reputation: 111

How to getDate and getMonth in Angular UI calendar?

When I use function:

$scope.getDate = function() {
    return uiCalendarConfig.calendars['myCalendar1'].fullCalendar('getDate');
}

It returns wrong date after I switch to +2 or -2 months. How can I get the date/month which I chose on calendar?

Upvotes: 1

Views: 1032

Answers (1)

Mahendra Kavathiya
Mahendra Kavathiya

Reputation: 118

Hello Can you try with this code on your calendar configuration for check date display okay or not?

viewRender:function( view, element ){
   console.log($('#calendar').fullCalendar('getDate').format('YYYY-MM-DD'));
}

It will be correct display in my basic configuration even. Hope it will be help.

Upvotes: 1

Related Questions