Skip to content

Commit

Permalink
Consultation Form: admission date as date time field
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Oct 12, 2023
1 parent e38206a commit 9c361bd
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1145,17 +1145,24 @@ export const ConsultationForm = (props: any) => {
className="col-span-6"
ref={fieldRef["admission_date"]}
>
<DateFormField
{...field("admission_date")}
required
disableFuture
label={
state.form.suggestion === "A"
? "Date of Admission"
: "Domiciliary Care Start Date"
}
position="LEFT"
/>
{state.form.suggestion === "DC" && (
<DateFormField
{...field("admission_date")}
required
disableFuture
label="Domiciliary Care Start Date"
position="LEFT"
/>
)}
{state.form.suggestion === "A" && (
<TextFormField
{...field("admission_date")}
required
label="Date & Time Admission"
type="datetime-local"
max={dayjs().format("YYYY-MM-DDTHH:mm")}
/>
)}
</div>

{!isUpdate && (
Expand Down

0 comments on commit 9c361bd

Please sign in to comment.