Skip to content

Commit

Permalink
Calendar not loading older post on navigation #1707
Browse files Browse the repository at this point in the history
  • Loading branch information
olatechpro committed Jul 24, 2024
1 parent cb8b2e3 commit e0f5460
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modules/calendar/lib/async-calendar/js/AsyncCalendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,15 @@ export default function AsyncCalendar(props) {
setIsLoading(true);
setMessage(props.strings.loading);

let dataUrl = getUrl(props.actionGetData, '&start_date=' + getDateAsStringInWpFormat(getBeginDateOfWeekByDate(firstDateToDisplay, props.weekStartsOnSunday)) + '&number_of_weeks=' + numberOfWeeksToDisplay);
let dataUrl = getUrl(props.actionGetData, '');

if (calendarFilter && Object.keys(calendarFilter).length > 0) {
let calendarFilterParams = new URLSearchParams(calendarFilter);
dataUrl += '&' + calendarFilterParams.toString();
}

dataUrl += '&start_date=' + getDateAsStringInWpFormat(getBeginDateOfWeekByDate(firstDateToDisplay, props.weekStartsOnSunday)) + '&number_of_weeks=' + numberOfWeeksToDisplay;

if (searchText) {
dataUrl += '&s=' + searchText;
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/calendar/lib/async-calendar/js/index.min.js

Large diffs are not rendered by default.

0 comments on commit e0f5460

Please sign in to comment.