UPDATE: I just stumbled across this after i posted but it was crashing because i had the Telerik Example: DayStyleSelector applied with the DayTemplate. If i were to remove the DayStyleSelector the control no longer crashes.
The attached image is my Calendar control as you can see it seems like its a bit sqiushed where sunday is right as the edge of the control and saturday has some space to the right of it.
Additionally the dates are not centered in the middle of the selection circles.
I tried to use the example Day template(https://docs.telerik.com/devtools/maui/controls/calendar/templates) to see if i can fix this myself but when applied i get a crash...
<DataTemplate x:Key="DayLabelTemplate">
<telerik:RadBorder>
<Label TextColor="#8660C5"
TextDecorations="Underline"
Text="{Binding Text}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
FontSize="20"
FontAttributes="Bold"/>
</telerik:RadBorder>
</DataTemplate>
Am I doing something wrong or is there currently something wrong with the Calendar control?
I've only done testing on Android and have not tested anything out on an iOS device yet.
Code behind.....
<GridPadding="20"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand">
<Grid
Padding="10"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundColorLight},
Dark={StaticResource BackgroundColorDark}}"
HorizontalOptions="CenterAndExpand"
RowSpacing="10"
VerticalOptions="CenterAndExpand">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<telerik:RadCalendar
x:Name="MyCalendar"
Grid.Row="0"
AutomationId="calendar"
SelectionMode="Single"
DayTemplate="{StaticResource DayLabelTemplate}"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundColorLight},
Dark={StaticResource AccentColorLightDark}}"
DisplayMode="Month"
HeaderBorderStyle="{StaticResource HeaderBorderStyle}"
HeaderLabelStyle="{StaticResource HeaderLabelStyle}"
DayStyleSelector="{StaticResource DayStyleSelector}"
MaxDate="12/31/2024"
MinDate="1/1/2022" />
<StackLayout
Grid.Row="1"
HorizontalOptions="CenterAndExpand"
Orientation="Horizontal"
VerticalOptions="CenterAndExpand">
<StackLayout.Spacing>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS" Value="40" />
<On Platform="Android" Value="20" />
</OnPlatform>
</StackLayout.Spacing>
<Button
Padding="-1"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundColorLight},
Dark={StaticResource AccentColorDark}}"
Clicked="CancelButton_Clicked"
HeightRequest="30"
Style="{StaticResource BaseButtonStyle}"
Text="Cancel"
TextColor="{AppThemeBinding Light={StaticResource TextColorLight},
Dark={StaticResource TextColorDark}}" />
<Button
Padding="-1"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundColorLight},
Dark={StaticResource AccentColorDark}}"
Clicked="OkButton_Clicked"
HeightRequest="30"
Style="{StaticResource BaseButtonStyle}"
Text="Ok"
TextColor="{AppThemeBinding Light={StaticResource TextColorLight},
Dark={StaticResource TextColorDark}}" />
</StackLayout>
</Grid>
</Grid>