Search code examples
nativescriptnativescript-telerik-ui

Highlighting specific days on Calendar


I'm using the Nativescript Pro UI RadCalendar and have a requirement which requires me to highlight certain specific days when the calendar is in Month View.

I understand I can use dayCellStyle however this doesn't allow me to apply this style to only specific days. I have also tried using the selectedDayStyle and passing in my array of selected dates which works but only if I pass in Multiple to the selectionMode property which allows the user to unselect the highlighted dates.

Is there something I'm missing or is this use case not supported yet?


Solution

  • Styling or preventing selection of a particular day is not supported by RadCalendar. But an ugly workaround could be listening to selected dates change event and apply the selected dates you want back at RadCalendar.

    Here is a Playground Sample, I was able to verify it with Android, hope it works with iOS too.