FSCalendar icon indicating copy to clipboard operation
FSCalendar copied to clipboard

Time zone support for swift

Open zzdravkin opened this issue 1 year ago • 5 comments

time zone crashing for some swift new zones (example America/Mazatlan) some time zones are not know in Obj-C from Swift Now timezone is created from abbreviation.

https://github.com/WenchaoD/FSCalendar/issues/1424

zzdravkin avatar Jan 30 '24 13:01 zzdravkin

@zzdravkin I tried this but still not working.

ravalzankhan avatar Jan 30 '24 13:01 ravalzankhan

can you give more details what is not working, or what error you are getting ?

zzdravkin avatar Jan 30 '24 13:01 zzdravkin

Same error *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempted to modify the selection of an out-of-bounds item (64) when there are only 42 items in section 647. Collection view: <FSCalendarCollectionView: 0x105831800; baseClass = UICollectionView; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x2825c57d0>; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x282b14a00>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; layout: <FSCalendarCollectionViewLayout: 0x103e1a830>; dataSource: <FSCalendar: 0x103d1b4a0; frame = (0 64; 375 300); autoresize = RM+BM; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x282b065a0>>>.' *** First throw call stack: (0x19cb9579c 0x1951676a8 0x19c14cdc0 0x19eefd7b0 0x19eefc5e8 0x19eefc584 0x102dd57e0 0x102dd4c34 0x102dd4ba8 0x102dffd14 0x102e00170 0x19ee18d84 0x19ebe9f20 0x19ebe88a0 0x19f25723c 0x19ece12e4 0x19ece0a44 0x19ece09ac 0x19ec05c28 0x19e06c7e0 0x19e06c36c 0x19e072500 0x19e06bae0 0x19ec61180 0x19cae4ba0 0x19cae3654 0x19cae2cf4 0x19cae2824 0x1db2fe9fc 0x19ede77f0 0x19ede6e5c 0x102e08f90 0x1bd5bb9c4) libc++abi: terminating due to uncaught exception of type NSException

*** Assertion failure in -[FSCalendarCollectionView _validateSelectionOrHighlightIndexPath:isSelection:allowMassIndexPath:assertIfInvalid:], UICollectionView.m:8,265

ravalzankhan avatar Jan 30 '24 13:01 ravalzankhan

@zzdravkin I downloaded latest code from your branch and checked, it also crashed. see the attached video for a better idea.

https://github.com/WenchaoD/FSCalendar/assets/157672253/d7cacaf0-536e-4646-8a85-0693cb27e33c

ravalzankhan avatar Jan 30 '24 14:01 ravalzankhan

@zzdravkin I found one more issue with the same time zone (America/Mazatlan). Here current date is 2024-02-02(YYYY-MM-dd) format and I loaded the FSCalendar with a current date but it displays January month dates instead of February months. You can check the below video please give a solution if you have one. In the video above center date is the current date.

https://github.com/WenchaoD/FSCalendar/assets/157672253/192f84f0-aca3-4727-8510-05469f97d8f7

ravalzankhan avatar Feb 02 '24 10:02 ravalzankhan