update date field

This commit is contained in:
Meghan McLaughlin committed 2020-04-15 10:53:32 -05:00
1 parent 7e55e0bf17
commit 2efb19fc8c
3 files changed
+21 -27

No files matched your search

+13 -15
View File
@@ -9,7 +9,7 @@ import {
WhiteSpace,
} from "antd-mobile";
import enUs from "antd-mobile/lib/date-picker/locale/en_US";
import "../scss/Login.scss";
import "../scss/PatientInfoForm.scss";
const RadioItem = Radio.RadioItem;
@@ -45,6 +45,9 @@ export default function Form(): ReactElement {
const nicknameField: HTMLInputElement = document.getElementById(
"nickname"
) as HTMLInputElement;
const birthdateField: HTMLInputElement = document.getElementById(
"birthdate"
) as HTMLInputElement;
const complaintField1: HTMLInputElement = document.getElementById(
"complaint1"
) as HTMLInputElement;
@@ -58,15 +61,17 @@ export default function Form(): ReactElement {
console.log("First name:", firstNameField.value);
console.log("Last name:", lastNameField.value);
console.log("Nickname:", nicknameField.value);
console.log("Birth Date:", birthdateField.value);
console.log(
"Complaints: ",
complaintField1.value +
" " +
complaintField2.value +
" " +
complaintField3.value
" " +
complaintField2.value +
" " +
complaintField3.value
);
console.log("Wants Planning?: " + planning);
};
return (
@@ -109,16 +114,9 @@ export default function Form(): ReactElement {
<WhiteSpace />
<DatePicker
mode="date"
locale={enUs}
title="Birth Date"
extra="Birth Date"
data-seed="birthDate"
>
<List.Item arrow="horizontal">Birth Date</List.Item>
{/* TODO: figure out how to access this value */}
</DatePicker>
<InputItem placeholder="YYYY-MM-DD" id="birthdate">
Birth Date
</InputItem>
<InputItem type="number" placeholder="Age" id="age">
Age{" "}
@@ -1,12 +0,0 @@
/* istanbul ignore file */
import React, { ReactElement } from "react";
export default function PatientInfoPlaceholder(): ReactElement {
return (
<img
src="https://i.imgur.com/K5pR07w.png"
alt="placeholder"
style={{ width: "100%", height: "100%" }}
></img>
);
}
+8
View File
@@ -0,0 +1,8 @@
#patient-info-wrapper {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
}