This is a migrated thread and some comments may be shown as answers.

How to show how many other events in month views?

3 Answers 343 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
宏吉
Top achievements
Rank 1
宏吉 asked on 20 Jul 2017, 07:04 AM

I want to change the dots to how many else events in that day ,show like one more event will show +1

How to do that?

3 Answers, 1 is accepted

Sort by
0
Tyler
Top achievements
Rank 1
answered on 21 Jul 2017, 01:56 PM

You can do this in the dataBound event of the scheduler:

if(e.sender.view().title == 'Month'){
                        $('.k-more-events>span').each(function(){
                                $(this).text('+1');
                            });
                        }

where those little '...' bars have the are a span in a div with class .k-more-events. Of course, you would change the text to the number count instead of just a hard coded +1. You will have to adjust font size and size of that bar to fit the text, which you would do in that loop.

The scheduler has an occurrencesInRange() function to get a list of events within a time range to get the amount of events in a day (I am not 100% sure if it will count the events it truncates in month view, I would think it would... but if it doesn't you will need custom logic to get those).

0
宏吉
Top achievements
Rank 1
answered on 23 Jul 2017, 05:17 AM
Yes, that is what I need, but how to know the date in $('.k-more-events>span') 
0
Ivan Danchev
Telerik team
answered on 24 Jul 2017, 06:11 AM
Hello Hung-chi,

We have a HowTo article showing how the Scheduler's month view can be extended, in order for the number of the hidden events to be displayed. You can find it here.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
宏吉
Top achievements
Rank 1
Answers by
Tyler
Top achievements
Rank 1
宏吉
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or