We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to use range selection on SfCalendar by using MVVM pattern

SfCalendar allows us to select a range of date in a month by setting SelectionMode property to RangeSelection.

RangeSelection can be achieved by either dragging on the range of dates which we need to select or by taping on to the Start date and End date.

Here we have explained the RangeSelection by using a simple ViewModel sample.

 

MainPage: XAML

View for SfCalendar and the buttons which will be used to save the selected range.

 

 

Main Page : C#

 

 

 

ViewModel: C#

 

ViewModel page which contains the binding properties.

 

 

 

Model: C#

 

Model page which contains the range of selected dates in a collection.

 

 

 

 

 

 

 

 Selecting a range of Dates:                 

 

 

 

Retrieving Selected Range:

 

 

 

                              

 

                                                                                                                        

 

Sample link:

Download the complete sample from the below given link.

 Sample

Article ID: Published Date: Last Revised Date: Platform: Control:
8591 03/15/2018 03/15/2018 Xamarin.Forms SfCalendar
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.