yurkinh / Plugin.Maui.Calendar

.NET MAUI port of XF calendar plugin
MIT License
108 stars 11 forks source link

Calendar items are not loading, App crash issue #72

Closed yashaswinidc closed 3 weeks ago

yashaswinidc commented 4 weeks ago
image image image

I'm encountering an issue with a Calendar component where it initially displays the same way on both Android and iOS, similar to Image 1. However, when I navigate to other pages and return, it changes to the appearance shown in Images 2 (iOS) and 3(Android). Additionally, the app crashes. This issue occurs consistently just by initializing the month view of the Calendar component from the package.

yurkinh commented 4 weeks ago

Hi @yashaswinidc As a workaround, you can downgrade to the version 1.1.6 I plan to release new version today or tomorrow with fixes

yashaswinidc commented 4 weeks ago

Hello @yurkinh, I attempted using version 1.1.6, but I'm still experiencing the same issue. Thanks for your response, and I look forward to the upcoming release.

yurkinh commented 4 weeks ago

Hi @yashaswinidc Check please v 1.1.9

yashaswinidc commented 4 weeks ago

Hi @yurkinh, the issue remains unresolved. I'm still encountering the same problem.

yurkinh commented 4 weeks ago

@yashaswinidc Can you temporarily upgrade your app to 8.0.60 to test the fix? I have updated calendar to the latest maui version cause it contains a lot of fixes. But I will think about downgrading it to 8.0.40 cause a lot of developers stay on 8.0.40

yashaswinidc commented 4 weeks ago

@yurkinh I did it and still the issue persists.

yurkinh commented 4 weeks ago

@yashaswinidc Can you provide some minimal repro sample? Try to call the Dispose() method when leaving the page.

yashaswinidc commented 4 weeks ago

<ctrlcal:Calendar x:Name="monthView" Margin="0,0,0,0" Padding="10,10,10,20" Grid.Row="0" IsVisible="{Binding CanCalenderVisible}" AnimateCalendar="True" BackgroundColor="White" DayTappedCommand="{Binding DayTappedCommand}" DayViewCornerRadius="20" DayViewSize="40" DaysLabelStyle="{StaticResource daysLabelStyle}" DaysTitleColor="#2b3990" DaysTitleHeight="40" DaysTitleLabelStyle="{StaticResource daysTitleLabelStyle}" DaysTitleMaximumLength="TwoChars" MaximumDate="{Binding MaxDate}" MinimumDate="{Binding MinDate}" DeselectedDayTextColor="#485f5c" DisableSwipeDetection="True" EventIndicatorColor="Red" EventIndicatorSelectedColor="IndianRed" EventIndicatorSelectedTextColor="AliceBlue" EventIndicatorTextColor="#485f5c" EventIndicatorType="BottomDot" Events="{Binding Events}" HorizontalOptions="FillAndExpand" MonthLabelColor="Red" Month="{Binding MonthYear}" Year="{Binding MonthYear}" OtherMonthDayColor="#f2efef" OtherMonthDayIsVisible="True" SelectedDate="{Binding SelectedDate}" SelectedDateColor="Violet" SelectedDateTextFormat="ddd, dd MMM yyyy" SelectedDayBackgroundColor="#ee2d25" SelectedDayTextColor="White" SwipeToChangeMonthEnabled="False" SwipeUpToHideEnabled="False" TodayFillColor="Transparent" TodayOutlineColor="#ee2d25" VerticalOptions="Start" HeightRequest="380" YearLabelColor="Blue">

In my viewmodel SelectedDate is defined this way public DateTime SelectedDate { get; set; } = DateTime.Now.Date; However, when I attempt to update the SelectedDate (after navigating to other page and returning) in the DayTappedCommand, the app crashes. The issue persists even without the custom header and footer elements. The calendar control is used as follows in another page:
yurkinh commented 4 weeks ago

@yashaswinidc Could you provide logs or a full repro sample to trace the issue?

yashaswinidc commented 3 weeks ago

Hi @yurkinh, The issue has been resolved. I didn't do any fix from my side. Currently I'm using latest version of the package. Thanks for the support.