Skip to content

Commit

Permalink
Merge pull request #1325 from openedx/eahmadjaved/fix-analyticsv2
Browse files Browse the repository at this point in the history
fix: endDate on analytics v2 page
  • Loading branch information
jajjibhai008 authored Oct 4, 2024
2 parents 60c58a0 + c73d3ab commit 25db621
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/AdvanceAnalyticsV2/AnalyticsV2Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
startDate,
endDate,
});
const currentDate = new Date().toISOString().split('T')[0];
return (
<>
<Helmet title={PAGE_TITLE} />
Expand Down Expand Up @@ -77,8 +78,8 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
</Form.Label>
<Form.Control
type="date"
value={endDate || data?.maxEnrollmentDate}
max={data?.maxEnrollmentDate}
value={endDate || currentDate}
max={currentDate}
onChange={(e) => setEndDate(e.target.value)}
/>
</Form.Group>
Expand Down

0 comments on commit 25db621

Please sign in to comment.