Hi,
There is no built-in functionality for this. You have to filter out recurring events by yourself. There is a Filter method in the EPiSerer Calendar control where you can do this.
I did try that earlier but it didn't change anything, perhaps I did something wrong.
@ OnLoad
EventsList.Filter += new FilterEventHandler(SelectedDatesFilter);
EventsList.DataSource = EventsCollection;
And then the actual filter
protected void SelectedDatesFilter(object sender, FilterEventArgs f)
{
PageDataCollection Pages = f.Pages;
List<PageData> Passed = new List<PageData>();
foreach (PageData Page in Pages)
{
if (Passed.Contains(Page))
{
Pages.Remove(Page);
}
else
{
Passed.Add(Page);
}
}
}
In the asual FilterEventArgs (System.Windows.Data) you set the Accepted-property but EPiServer's FilterEventArgs only contains a definition for Pages. How to set if the page is accepted or does EPiServer fix this by itself?
EDIT: That actually does not make any change. There are no duplicates. It must be in the rendering it occurs. Any thoughts about this? How to limit so each event is only printed at one day. Why I want to do this is because I print the date as "start date - end date" if the event spans over several days. This is the current result when I select a week (you will see what is wrong).
I figured out that what I actually needed was not an EPiServer:Calender, instead I used a EPiServer:PageList since what I was trying to achieve was a list of events (pages). This solved all my problems.
Hello. I am currently developing a calendar function in an existing EPiServer website (CMS 7 using Webforms). The calendar is built using asp:calendar as the "month view" and when the user selects a date a EPiServer:Calendar displays the events. This works fine when I select a single day, however when I select a week or month same event are displayed multiple times. Those events lasts for more than a day.
I have tried search Google, this forum and the sdk with no result. I have seen that this question have been asked before but I cannot find a single thread with an answer.
So how can I filter the events so they are just shown once?
Thanks in advance,
David Rutqvist