Skip to content

Commit

Permalink
fix: endDate on analytics v2 page
Browse files Browse the repository at this point in the history
  • Loading branch information
jajjibhai008 committed Oct 4, 2024
1 parent 60c58a0 commit c73d3ab
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 c73d3ab

Please sign in to comment.