Blazor Calendar control multiselect databinding

i'm looking for an example of data binding with the blazor calendar control using Multi Selection


3 Replies 1 reply marked as answer

BC Berly Christopher Syncfusion Team July 29, 2021 10:42 AM UTC

Hi John,


Greetings from Syncfusion support.


We can achieve the requested requirement with help of IsMultiSelection and Values property in the Calendar component. Kindly refer the below code example and sample.


<SfCalendar TValue="DateTime?" IsMultiSelection="true" @bind-Values="@MultipleValues"></SfCalendar>

 

@code{

    public DateTime[] MultipleValues { get; set; } = new DateTime[] { DateTime.Now, new DateTime(2021, 7, 2, 0, 0, 0) };

}


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Multiselection-1677254919


UG Link: https://blazor.syncfusion.com/documentation/calendar/multi-select/


API Link: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Calendars.SfCalendar-1.html#Syncfusion_Blazor_Calendars_SfCalendar_1_IsMultiSelection


Regards,

Berly B.C


Marked as answer

JM John Marsing July 29, 2021 02:30 PM UTC

Thanks, that worked



BC Berly Christopher Syncfusion Team July 30, 2021 05:31 AM UTC

Hi John, 

We are glad to know that the issue is resolved at your end. Please let us know if you need further assistance on this. 

Regards, 
Berly B.C 


Loader.
Up arrow icon