From b4100f5c692d6a589c90c75246676aa9e4a28b04 Mon Sep 17 00:00:00 2001 From: Nicholas Mandel Date: Sat, 21 Mar 2020 11:18:20 -0700 Subject: [PATCH] fix(adddiagnosismodal and datepickerwithlabelformgroups): required field Added required fields to diagnosis name and date fix #1926 --- src/components/input/DatePickerWithLabelFormGroup.tsx | 5 +++-- src/patients/diagnoses/AddDiagnosisModal.tsx | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/input/DatePickerWithLabelFormGroup.tsx b/src/components/input/DatePickerWithLabelFormGroup.tsx index be7e41522c..b6fc61f4b6 100644 --- a/src/components/input/DatePickerWithLabelFormGroup.tsx +++ b/src/components/input/DatePickerWithLabelFormGroup.tsx @@ -7,14 +7,15 @@ interface Props { value: Date | undefined isEditable?: boolean onChange?: (date: Date) => void + isRequired?: boolean } const DatePickerWithLabelFormGroup = (props: Props) => { - const { onChange, label, name, isEditable, value } = props + const { onChange, label, name, isEditable, value, isRequired } = props const id = `${name}DatePicker` return (
-
@@ -75,6 +76,7 @@ const AddDiagnosisModal = (props: Props) => { value={new Date(diagnosis.diagnosisDate)} isEditable onChange={onDiagnosisDateChange} + isRequired />