bugfix/AB#32195-quick-date-range-not-dynamic#2102
Merged
JamesPasta merged 2 commits intodevfrom Mar 6, 2026
Merged
Conversation
Fixed bug that when the QuickDateRange was loaded from memory, stored dates rather than dynamic dates were set. Now when loading, if a quick range is selected, dates are regenerated, and stored dates are only loaded for the 'Custom' range. Centralized date range filter handling to update UI, filter state, and localStorage consistently. Fixed an extra bug that date ranges saved with table views were overriding local storage on page load.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes date range filtering on the Grant Applications list so “Quick range” selections remain dynamic when restored (localStorage / saved table views), and centralizes filter/UI/localStorage synchronization to avoid inconsistent state on page load.
Changes:
- Centralized date range application into
setDateRangeFilters(...)andsetDateRangeLocalStorage(...). - Regenerates dates for non-custom quick ranges when restoring from localStorage or saved table views; only uses stored dates for
custom. - Prevents saved table view state from overriding localStorage-driven filters on initial page load.
Comments suppressed due to low confidence (1)
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js:342
- When the user selects the "custom" quick range, the handler returns before persisting the selection. This means localStorage may keep the previous preset range, so on reload the UI can revert away from "custom" (even if the user intentionally selected it but didn’t change any dates yet). Persist the quick range selection for the custom case too (e.g., set
GrantApplications_QuickRangetocustombefore returning, and consider keeping existing from/to values).
function handleQuickDateRangeChange() {
const selectedRange = $(this).val();
if (selectedRange === 'custom') {
// Show the custom date inputs and don't modify their values
toggleCustomDateInputs(true);
return;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js
Outdated
Show resolved
Hide resolved
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js
Show resolved
Hide resolved
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js
Outdated
Show resolved
Hide resolved
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js
Outdated
Show resolved
Hide resolved
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js
Outdated
Show resolved
Hide resolved
JamesPasta
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed bug that when the QuickDateRange was loaded from memory, stored dates rather than dynamic dates were set. Now when loading, if a quick range is selected, dates are regenerated, and stored dates are only loaded for the 'Custom' range.
Centralized date range filter handling to update UI, filter state, and localStorage consistently.
Fixed an extra bug that date ranges saved with table views were overriding local storage on page load.