Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed targetPage not current month #1261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yanxiaobing
Copy link

firstWeekday = 2
adjustsBoundingRectWhenChangingMonths = true

     问题1:
     2020年11月1号,周历和月历模式切换会出问题
     原因:
     从6行月历切换到周历时,targetPage会变为10月28号,此时从周历切换为月历,会通过targetPage去算本月月历行数,此时得到的结果是5行(10月的行数)
     处理方法:
     将源码fs_middleDayOfWeek改为fs_lastDayOfWeek

     问题2:
     2020年11月30号,周历和月历模式切换会出问题
     原因:
     从6行月历切换到周历时,targetPage会变为12月3号,此时从周历切换为月历,会通过targetPage去算本月月历行数,此时得到的结果是5行(12月的行数)
     处理方法:
     将源码fs_middleDayOfWeek改为fs_firstDayOfWeek

终极方案:
边界日期需要更细致的判断以保证targetPage在当前月

firstWeekday = 2
         adjustsBoundingRectWhenChangingMonths = true

         问题1:
         2020年11月1号,周历和月历模式切换会出问题
         原因:
         从6行月历切换到周历时,targetPage会变为10月28号,此时从周历切换为月历,会通过targetPage去算本月月历行数,此时得到的结果是5行(10月的行数)
         处理方法:
         将源码fs_middleDayOfWeek改为fs_lastDayOfWeek

         问题2:
         2020年11月30号,周历和月历模式切换会出问题
         原因:
         从6行月历切换到周历时,targetPage会变为12月3号,此时从周历切换为月历,会通过targetPage去算本月月历行数,此时得到的结果是5行(12月的行数)
         处理方法:
         将源码fs_middleDayOfWeek改为fs_firstDayOfWeek
终极方案:
         边界日期需要更细致的判断以保证targetPage在当前月
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant