修正Calendar的Bug
procedure TAndroidNativeCalendarListener.onSelectedDayChange(view: JCalendarView; year, month, dayOfMonth: Integer); var OldDay, NewDay: Word; begin OldDay := DayOf(FCalendar.Model.DateTime); NewDay := DayOf(Date); FCalendar.Model.DisableNotify; try // FCalendar.Model.DateTime := EncodeDate(year, month, dayOfMonth); FCalendar.Model.DateTime := EncodeDate(year, month+1, dayOfMonth); finally FCalendar.Model.EnableNotify; end; if Assigned(FCalendar.Model.OnChange) then FCalendar.Model.OnChange(FCalendar.Control); if (OldDay <> NewDay) and Assigned(FCalendar.Model.OnDateSelected) then FCalendar.Model.OnDateSelected(FCalendar.Control); end;
打开FMX.Calendar.Android.pas单元,找到上面的方法,按标红处修改。
https://quality.embarcadero.com/browse/RSP-23873
10.3.2测试通过。