twinssbc / Ionic-Calendar

A calendar directive for Ionic framework
http://twinssbc.github.io/Ionic-Calendar/demo
MIT License
159 stars 73 forks source link

Not able to display month events #182

Open Raagu1993 opened 5 years ago

Raagu1993 commented 5 years ago

@twinssbc When I click on the date in the month view, events are showing undefined. Could you please let me know how to resolve it? Kindly find the below screen grab.

image

twinssbc commented 5 years ago

@Raagu1993 If events is undefined, that mean there's no event on that date. Is that not expected?

Raagu1993 commented 5 years ago

Thanks, I am getting events.

After getting events in onTimeSelected function, how to bind events in monthviewEventDetail.html. I am not able to bind it from controller

twinssbc commented 5 years ago

@Raagu1993 Could you provide your code?

Raagu1993 commented 5 years ago

-In my controller I am assigning events to "selectedDate" as below

   $scope.onTimeSelected = function(selectedTime, events, disabled) {
              $scope.selectedDate = events;
    };

-I am trying to bind events values in monthviewEventDetail.html. Not able to print. I have added monthviewEventDetail.html custom.

image

-But, If I hard code any content in monthviewEventDetail.html. I am able to see in the view

image

-In HTML

image

twinssbc commented 5 years ago

@Raagu1993 You don't need to assign events to selectedDate. It is handled internally.