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

fix 日期日期比较时大小不正确的问题 #35

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

Conversation

LAzyOnline
Copy link

例如:设置禁用的开始时间为2021.2.1,此时在MonthView#setDateList(List,int)中对CalendarUtil.dateToMillis(mAttrsBean.getDisableStartDate()) > CalendarUtil.dateToMillis(date.getSolar())的比较将出现问题,日历中2021.1.29 ~ 2021.1.31的日期都可用。发现是由于CalendarUtil.dateToMillis(int[])中调用Calendar.set(int,int,int)时,month的值不正确引起的。

例如:设置禁用的开始时间为2021.2.1,此时在MonthView#setDateList(List<DateBean>,int)中对CalendarUtil.dateToMillis(mAttrsBean.getDisableStartDate()) > CalendarUtil.dateToMillis(date.getSolar())的比较将出现问题,日历中2021.1.29 ~ 2021.1.31的日期都可用。发现是由于CalendarUtil.dateToMillis(int[])中调用Calendar.set(int,int,int)时,month的值不正确引起的。
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