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

Events spanning multiple days

1 Answer 79 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ejb
Top achievements
Rank 2
ejb asked on 21 May 2015, 04:13 PM

Does the CalendarView support events spanning multiple days?

For example an event starts at 11 PM and goes to 2 AM the next day. the event only shows on the day it starts.

 is this just a limitation of the calendar or is there something else you have to do to get them to show on days other than just the starting day?

1 Answer, 1 is accepted

Sort by
0
Accepted
Antony Jekov
Telerik team
answered on 25 May 2015, 12:58 PM
Hello EJ,

Thank you for contacting the Android team.

Events which extend in periods longer than a single day will be shown multiple times in the range of the event. Refer to the screenshot I am sending you.

I am using the following code:
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
 
    Calendar calendar = Calendar.getInstance();
    long now = calendar.getTimeInMillis();
    calendar.add(Calendar.DATE, 1);
    long tomorrow = calendar.getTimeInMillis();
 
    RadCalendarView calendarView = new RadCalendarView(this);
    List<Event> events = new ArrayList<Event>();
    events.add(new Event("Long event", now, tomorrow));
    calendarView.getEventAdapter().setEvents(events);
 
    setContentView(calendarView);
}


Regards,
Antony Jekov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Calendar
Asked by
ejb
Top achievements
Rank 2
Answers by
Antony Jekov
Telerik team
Share this question
or