Skip to content

This repository contains a sample on How to clear appointments in the AgendaView on month change in the Syncfusion Xamarin.Forms Calendar (SfCalendar)?

Notifications You must be signed in to change notification settings

SyncfusionExamples/clear-agendaview-appointments-calendar-xamarin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to clear appointments in the AgendaView on month change in Xamarin.Forms Calendar (SfCalendar)

You can programmatically clear the selected dates and appointments in AgendaView using the ClearSelection method in Xamarin.Forms SfCalendar.

You can also refer the following article.

https://www.syncfusion.com/kb/11793/how-to-clear-appointments-in-the-agendaview-on-month-change-in-xamarin-forms-calendar

STEP 1: Set InlineViewMode as Agenda, and set ShowInlineEvents to true for displaying events.

<calendar:SfCalendar x:Name="calendar"
                             ShowInlineEvents="True"
                             InlineViewMode="Agenda"
                             DataSource="{Binding Appointments}">
        <calendar:SfCalendar.BindingContext>
            <local:ViewModel/>
        </calendar:SfCalendar.BindingContext>
</calendar:SfCalendar>

STEP 2: By using the MonthChanged event in the calendar, you can call the ClearSelection method to clear selected date and its appointments in the AgendaView.

private void Calendar_MonthChanged(object sender, MonthChangedEventArgs e)
{
            this.calendar.ClearSelection();
}

Output

ClearAgendaViewData

About

This repository contains a sample on How to clear appointments in the AgendaView on month change in the Syncfusion Xamarin.Forms Calendar (SfCalendar)?

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages