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. Image for the cookie policy date

Custom selector


I'm making a custom calendar and using the calendar in SingleSelection. I want a custom selector, but can't figure out how to do that. I can change the selectioncolor, that's it.
I've tried to do it in selection_changed and work with the dateAdded and dateRemoved, but I can't refresh the calendar or that would just be gone again (and it takes too long anyway). It is not possible to refresh one cell either so it won't work that way.

I have a frame and a label in my cells. I'd like the frame to get a darker color, so that the user knows that it is selected, while still being able to see which color it has.

Any suggestions on how to acomplish this?

Jens De Rijcke

3 Replies

IR Indumathi Ravichandran Syncfusion Team September 4, 2019 07:07 AM

Hi Jens, 
Thank you for contacting syncfusion support. 
Based on the provided information your requirement is “MonthCell DataTemplate selector support for calendar”. As of now there is no template selector support for month cells. But your requirement can be achieved by sample level using Frame, Label and when selecting the date frame color will changed. We have prepared the simple sample for the same. Please find the sample from following link. 
We have already considered to provide “DataTemplate Selector support for Month cells” in Calendar Xamarin.Forms and logged feature request for the same. We will implement this feature in any of our upcoming release.   
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then.  
Thank you for requesting this feature. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts.  
You can also communicate with us regarding the open features any time using our Feature Report page.   
Note: The provided feedback link is private, you need to login to view this feedback.  
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal and cast your vote to make it count.  
Indumathi R 

JD jens de rijcke September 5, 2019 03:21 AM


Thanks for the example, I was able to make it work!

I just have one question from the example. There has been made use of two frames, isn't it faster (shorter loading time) to just replace the property hasEvents by SelectedBgColor? 

SelectedBgColor = selected ? Color.DarkGreen : isEventedDate ? Color.CornflowerBlue : Color.White

Like that you can remove the second frame and avoid using IsVisible on these frames.

Jens De Rijcke

IR Indumathi Ravichandran Syncfusion Team September 6, 2019 07:14 AM

Hi Jens, 
Thank you for the update. 
Based on provided information we have removed the one Frame and we have modified the sample as per your requirement. It is prototype sample, so you can able to modify the sample based on your requirement. Also modified the sample based on your requirement. Please, find the sample from following link, 
Also, it is not a calendar default view. We have loaded the CustomView for the customization of month cells. So, it takes some time to load. It is the expected one. We have created the issue in GitHub. Please find the link, 
Kindly revert us if you have any concern. 
Indumathi R 

Live Chat Icon For mobile
Up arrow icon