angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 729 forks source link

how to add custom clues in calendar per day #384

Closed chenchen923 closed 8 years ago

chenchen923 commented 8 years ago

I want to let per day only has two calendar events.When per day has more than two events,I want to add some prompts in per day,like:oh there has another events in this day.But i do not find how to do,please help me.

peterver commented 8 years ago

You can use the eventLimit option of fullCalendar

http://fullcalendar.io/docs/display/eventLimit/

Fullcalendar will automatically add a link titled 'show more' which will show a popup with the additional hidden events when pressed.

For Example, say you want to set the amount of events shown to 2, you simply do

calendar : {
    views: {
        agenda : {
            eventLimit: 2,
        }
    }
}

Please note the fact that it is assigned to agenda, this is because you can specify eventLimit for any type of view ( week, month, day ).

If you want to know more about view-specific options, take a look at http://fullcalendar.io/docs/views/View-Specific-Options/