Skip to content

Commit

Permalink
Merge pull request #1709 from publishpress/fix/#1707-Calendar-not-loa…
Browse files Browse the repository at this point in the history
…ding-older-post-on-navigation

fix/#1707-Calendar-not-loading-older-post-on-navigation
  • Loading branch information
olatechpro authored Jul 24, 2024
2 parents cb8b2e3 + e0f5460 commit a7ad49b
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 a7ad49b

Please sign in to comment.