Repository navigation
SaiSandeep Fix Calender for loss tracking - #5606
Open
saisandeepkoritala wants to merge 8 commits into
Open
saisandeepkoritala wants to merge 8 commits into
saisandeepkoritala wants to merge 8 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
rahulrubugunday
requested changes
Oct 24, 2026
rahulrubugunday
left a comment
There was a problem hiding this comment.
I have reviewed your PR locally (a8a3f22, backend on development) and the calendar works as per requirement, but the chart's x-axis labels are missing.
- Start Date opens the custom month calendar, the year arrows work, and picking a month fills the field. The back arrow is disabled at 2022 and the range stops at Jun 2024, so invalid years can no longer be typed.
- With Jun 2023 as the start, the End Date calendar disables Jan through May 2023.
- Selecting Jun to Sep 2023 updates the chart to that range.
- Clear empties only that date, and Reset Filters clears both dates and restores all 9 lines.
- The legend shows all 9 items inside the chart card, with no horizontal scrolling.
Needs changes:
- The x-axis month labels no longer render. Every tick is blank, so the chart shows only "Time (months)" with no dates. In LossTrackingLineChart.jsx the XAxis uses dataKey="month", but chartData rows carry the month text in displayLabel (development uses dataKey="displayLabel"). This does not match your screenshots, which show the month labels.
|
This branch has not been deployed
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.



Description
The calendar feature in the Loss Tracking Line Chart is broken. The native
<input type="month">accepts invalid years (e.g.0020,0090), has a hidden native picker icon sitting under the custom icon, and behaves differently across browsers (Firefox has no month picker). This PR replaces the Start Date and End Date inputs with a custom month/year calendar picker for entering custom dates. It also fixes the chart legend overflowing outside the chart card and resolves the SonarCloud issues raised on these files.Implements #5371 - Implement Calendar feature for the loss tracking line graph (Priority High)
Related PRS (if any):
This PR is related to PR #5016 → #5371 (Loss Tracking Line Chart). No backend PR is required.
Main changes explained:
MonthPicker.jsx: Created a custom month/year calendar picker component with<dialog>, year navigation, month grid, and accessibility handlers (Esc/click-outside).LossTrackingLineChart.jsx:MonthPicker.endDate < startDate.LossTrackingLineChart.module.css: Added styling for.chartAreaand the custom picker; removed unused nativeinput[type="month"]styles.How to test:
npm installbefore running this PR locallyScreenshots or videos of changes:
Note:
Selectable dates are limited to the range available in the chart data (currently Jan 2022 to Jun 2024), so years like
0020can no longer be entered. If more data is added later, the range extends automatically.