Skip to content

Commit

Permalink
Fix onChange handler to call setSelectedFromDate() instead of setSele…
Browse files Browse the repository at this point in the history
…ctedToDate()
  • Loading branch information
jwnasambu committed Dec 18, 2024
1 parent a111ec8 commit 381a91d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function PrintModal({ patientUuid, closeDialog }) {
const session = useSession();
const { panels } = usePanelData();
const printContainerRef = useRef(null);
const [selectedFromDate] = useState(null);
const [selectedFromDate, setSelectedFromDate] = useState(null);
const [selectedToDate, setSelectedToDate] = useState(null);
const { excludePatientIdentifierCodeTypes } = useConfig<{
excludePatientIdentifierCodeTypes: {
Expand Down Expand Up @@ -117,7 +117,7 @@ function PrintModal({ patientUuid, closeDialog }) {
<OpenmrsDatePicker
className={styles.datePicker}
maxDate={new Date().toISOString()}
onChange={setSelectedToDate}
onChange={setSelectedFromDate}
value={selectedFromDate}
labelText={t('startDate', 'Start date')}
/>
Expand Down

0 comments on commit 381a91d

Please sign in to comment.