Skip to content

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.

1 participant