Closed xibeat closed 3 months ago
Hi @xibeat Thanks for the kind words. Could you please provide some minimal repro sample for easier debugging?
Sure. I am using the .net Maui Shell with two tabs. One of them is a page with the Calendar Plugin.
<Shell
x:Class="Project.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Shell.FlyoutBehavior="Disabled">
<TabBar>
<ShellContent ContentTemplate="{DataTemplate local:HomePage}" Icon="dotted_circle_icon" />
<ShellContent ContentTemplate="{DataTemplate local:CalendarPage}" Icon="dotted_circle_icon" />
</TabBar>
</Shell>
<controls:Calendar
CalendarLayout="Week"
HorizontalOptions="Fill"
ShowMonthPicker="False"
SelectedDayBackgroundColor="Black"
SelectedDayTextColor="White"
TodayOutlineColor="Black"
DaysTitleLabelStyle="{StaticResource LabelTextRegular16}"
DaysLabelStyle="{StaticResource LabelTextRegular14}"
ShowYearPicker="False"
EventsScrollViewVisible="False"
VerticalOptions="Fill"
AnimateCalendar="False"
ShownDate="{Binding Today}" />
Today is the Datetime.Today from the view model.
Steps to reproduce:
I have a similar bug on iOS, i can reproduce it with this minimal code
<ContentPage .......
xmlns:plugin="clr-namespace:Plugin.Maui.Calendar.Controls;assembly=Plugin.Maui.Calendar" >
<plugin:Calendar>
<plugin:Calendar.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"></TapGestureRecognizer>
</plugin:Calendar.GestureRecognizers>
</plugin:Calendar>
</ContentPage>
private async void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e)
{
EmptyPage emptyPage = new EmptyPage();
await Navigation.PushModalAsync(emptyPage);
await Task.Delay(1000);
await Navigation.PopModalAsync();
}
After the Empty Page is closed the calendar looks like this
is there a temporary solution to fix this?
Hi @yungd1plomat Working on it. I hope to provide fix soon
Encountering same issue when changing tab. Please find an issue, thanks
I also encountered this as well.
As a temporary workaround I would suggest downgrading to version 1.1.6 while I'm working on a solution for this issue. It's related to an events unsubscription that was changed.
Indeed version 1.16 works great..thanks for the work around..hope a solution can be found but what's more important is that its working 👍
I Tried with version 1.1.6 still I have the same issue when I navigate back to calendar, the days are missing, please find the solution for this issue, and also sometimes I have issue with UpdateDays Method, please look at that as well if you have some time, and its look awesome package Man! Thanks
I discovered that the problem disappears when I remove this line: https://github.com/yurkinh/Plugin.Maui.Calendar/blob/3f6c126a3e15bc7141458fe1c664d4c389589202/src/Plugin.Maui.Calendar/Shared/Controls/MonthDaysView.cs#L1076
@janousek @Muhesh02 I have already fixed this issue and plan to do a release today (or tomorrow) with some other goodies from PR#69
https://github.com/yurkinh/Plugin.Maui.Calendar/assets/3627193/060db2e7-e5f5-4acc-ad70-d00ceae29512
Enclosed is a video of the behavior, as you can see, the 27th which has an event is white on initial load, but when I use the home button and return to the app, it is black.
Repository:
Hi, First of all, great work with the plugin. I was using the calendar in Week view Layout. I noticed that when I change tabs in a shell and comeback to the calendar, I can't see any dates.
<controls:Calendar CalendarLayout="Week" HorizontalOptions="Fill" ShowMonthPicker="False" SelectedDayBackgroundColor="Black" SelectedDayTextColor="White" TodayOutlineColor="Black" DaysTitleLabelStyle="{StaticResource LabelRegular16}" DaysLabelStyle="{StaticResource LabelRegular14}" ShowYearPicker="False" EventsScrollViewVisible="False" VerticalOptions="Fill" AnimateCalendar="False" ShownDate="{Binding Today}" />
Output after switching and coming back to Shell Tab: