summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrohan09-raj <rajrohan1914@gmail.com>2022-08-25 16:51:10 +0530
committerrohan09-raj <rajrohan1914@gmail.com>2022-08-25 16:51:10 +0530
commit2d9100d3aa82d2901142464b7117c01cfbd6d04e (patch)
tree6f71f26d42cbc0d89f737a6451a6bc11ebdce4c4
parentdac079cd6c5693ee3a75611fe20b691ad30ed7ea (diff)
date picker
-rw-r--r--client/package.json2
-rw-r--r--client/src/components/Input/Input.module.css7
-rw-r--r--client/src/pages/Enrollment/FormOne/FormOne.jsx35
-rw-r--r--client/src/pages/Enrollment/FormOne/FormOne.module.css8
-rw-r--r--client/yarn.lock83
5 files changed, 116 insertions, 19 deletions
diff --git a/client/package.json b/client/package.json
index 0ebc93b..10b5b15 100644
--- a/client/package.json
+++ b/client/package.json
@@ -8,6 +8,7 @@
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.1",
"@mui/styles": "^5.9.3",
+ "@mui/x-date-pickers": "^5.0.0-beta.6",
"@tensorflow-models/coco-ssd": "^2.2.2",
"@tensorflow/tfjs": "^3.19.0",
"axios": "^0.27.2",
@@ -15,6 +16,7 @@
"i18next": "^21.9.0",
"i18next-browser-languagedetector": "^6.1.5",
"i18next-xhr-backend": "^3.2.2",
+ "moment": "^2.29.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^11.18.4",
diff --git a/client/src/components/Input/Input.module.css b/client/src/components/Input/Input.module.css
index 59867e9..3fc03f8 100644
--- a/client/src/components/Input/Input.module.css
+++ b/client/src/components/Input/Input.module.css
@@ -3,7 +3,7 @@
justify-content: center;
font-family: 'Barlow';
margin: 15px 0px;
- font-size: var(--font-medium-s);
+ font-size: 1.75rem;
}
.input__container {
@@ -12,10 +12,11 @@
}
.input__field {
- width: 330px;
+ width: 500px;
+ height: 80px;
margin: 10px 0px;
padding: 18px 10px;
border: 3px solid;
border-radius: 10px;
- font-size: 1rem;
+ font-size: 1.5rem;
}
diff --git a/client/src/pages/Enrollment/FormOne/FormOne.jsx b/client/src/pages/Enrollment/FormOne/FormOne.jsx
index f34a2ea..a1d4b7d 100644
--- a/client/src/pages/Enrollment/FormOne/FormOne.jsx
+++ b/client/src/pages/Enrollment/FormOne/FormOne.jsx
@@ -7,6 +7,10 @@ import styles from './FormOne.module.css'
import { userContext } from '../../../context/User'
import PopUpModal from '../../../components/Modal/Modal'
import AudioAutoplay from '../../../components/AudioAutoplay/AudioAutoplay'
+import { MobileDatePicker } from '@mui/x-date-pickers/MobileDatePicker'
+import { TextField } from '@mui/material'
+import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment'
+import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'
const FormOne = () => {
const { t } = useTranslation()
@@ -32,7 +36,12 @@ const FormOne = () => {
}
}, [userData.gender])
- const description = ['SELECT_YOUR_RESIDENCY_BY_SELECTING_THE_APPROPRIATE_CHECKBOX', 'ENTER_YOUR_FULL_NAME_WITHOUT_ANY_TITLE_OR_SALUTATION', 'SELECT_YOUR_GENDER_BY_CLICKING_ON_THE_APPROPRIATE_CARD', 'SELECT_YOUR_DATE_OF_BIRTH_FROM_THE_PROVIDED_CALENDER']
+ const description = [
+ 'SELECT_YOUR_RESIDENCY_BY_SELECTING_THE_APPROPRIATE_CHECKBOX',
+ 'ENTER_YOUR_FULL_NAME_WITHOUT_ANY_TITLE_OR_SALUTATION',
+ 'SELECT_YOUR_GENDER_BY_CLICKING_ON_THE_APPROPRIATE_CARD',
+ 'SELECT_YOUR_DATE_OF_BIRTH_FROM_THE_PROVIDED_CALENDER'
+ ]
return (
<>
@@ -44,7 +53,11 @@ const FormOne = () => {
description={
<>
<ul>
- {description.map((item) => (<li className="list__item" key='id'>{t(item)}</li>))}
+ {description.map((item) => (
+ <li className="list__item" key="id">
+ {t(item)}
+ </li>
+ ))}
</ul>
</>
}
@@ -145,7 +158,21 @@ const FormOne = () => {
<div className={styles.formone__dob}>
<label htmlFor="dob">{t('DATE_OF_BIRTH')}</label>
- <input
+ <LocalizationProvider dateAdapter={AdapterMoment}>
+ <MobileDatePicker
+ label="Date mobile"
+ inputFormat="mm/dd/yyyy"
+ value={userData.dob}
+ onChange={(e) => {
+ setUserData({
+ ...userData,
+ dob: e
+ })
+ }}
+ renderInput={(params) => <TextField {...params} />}
+ />
+ </LocalizationProvider>
+ {/* <input
className={styles.formone__dob_input}
type="date"
id="dob"
@@ -158,7 +185,7 @@ const FormOne = () => {
})
}}
required
- />
+ /> */}
</div>
</div>
</>
diff --git a/client/src/pages/Enrollment/FormOne/FormOne.module.css b/client/src/pages/Enrollment/FormOne/FormOne.module.css
index 646ea12..b83574a 100644
--- a/client/src/pages/Enrollment/FormOne/FormOne.module.css
+++ b/client/src/pages/Enrollment/FormOne/FormOne.module.css
@@ -44,10 +44,16 @@
margin: 0;
}
+.formone__dob label {
+ font-size: 1.75rem;
+}
+
.formone__dob_input {
- width: 330px;
+ width: 500px;
+ height: 80px;
margin: 10px 0px;
padding: 11px 10px;
border: 3px solid;
border-radius: 10px;
+ font-size: 1.5rem;
}
diff --git a/client/yarn.lock b/client/yarn.lock
index a1d1c9c..d436e47 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -1034,7 +1034,7 @@
dependencies:
regenerator-runtime "^0.13.4"
-"@babel/runtime@^7.12.0", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.7":
+"@babel/runtime@^7.12.0", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.18.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.7":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a"
integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==
@@ -1176,6 +1176,39 @@
resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.0.2.tgz#1bfafe4b7ed0f3e4105837e056e0a89b108ebe36"
integrity sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg==
+"@date-io/core@^2.15.0":
+ version "2.15.0"
+ resolved "https://registry.yarnpkg.com/@date-io/core/-/core-2.15.0.tgz#8133860c8ce163b8d0cca3c1caed8d5d1fbfb14e"
+ integrity sha512-3CRvQUEK7aF87NUOwcTtmJ2Rc1kN0D4jFQUfRoanuAnE4o5HzHx4E2YenjaKjSPWeZYiWG6ZhDomx5hp1AaCJA==
+
+"@date-io/date-fns@^2.15.0":
+ version "2.15.0"
+ resolved "https://registry.yarnpkg.com/@date-io/date-fns/-/date-fns-2.15.0.tgz#2541144f4fc40365efd7d0b7affa5d77dbe59102"
+ integrity sha512-hkVeLm0jijHS2F9YVQcf0LSlD55w9xPvvIfuxDE0XWNXOTcRAAhqw2aqOxyeGbmHxc5U4HqyPZaqs9tfeTsomQ==
+ dependencies:
+ "@date-io/core" "^2.15.0"
+
+"@date-io/dayjs@^2.15.0":
+ version "2.15.0"
+ resolved "https://registry.yarnpkg.com/@date-io/dayjs/-/dayjs-2.15.0.tgz#474a42586e67be1108a6f68b0a2e5e6088620fb6"
+ integrity sha512-wgYzwaXr9KxkHNYxrOb1t8fYLfAdjIf0Q86qdVCwANObcvyGcPBm0uFtpPK7ApeE4DJUlbuG0IX75TtO+uITwQ==
+ dependencies:
+ "@date-io/core" "^2.15.0"
+
+"@date-io/luxon@^2.15.0":
+ version "2.15.0"
+ resolved "https://registry.yarnpkg.com/@date-io/luxon/-/luxon-2.15.0.tgz#ad5bea9c46b46230bd780dc91413f31d1967830f"
+ integrity sha512-CxTRCo5AM96ainnYaTpe1NS9GiA78SIgXBScgeAresCS20AvMcOd5XKerDj+y/KLhbSQbU6WUDqG9QcsrImXyQ==
+ dependencies:
+ "@date-io/core" "^2.15.0"
+
+"@date-io/moment@^2.15.0":
+ version "2.15.0"
+ resolved "https://registry.yarnpkg.com/@date-io/moment/-/moment-2.15.0.tgz#d6c2c88b58534d0c44644abcfefc27cb32182dd8"
+ integrity sha512-AcYBjl3EnEGsByaM5ir644CKbhgJsgc1iWFa9EXfdb4fQexxOC8oCdPAurK2ZDTwg62odyyKa/05YE7ElYh5ag==
+ dependencies:
+ "@date-io/core" "^2.15.0"
+
"@emotion/babel-plugin@^11.10.0":
version "11.10.0"
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.10.0.tgz#ae545b8faa6b42d3a50ec86b70b758296f3c4467"
@@ -1781,10 +1814,10 @@
resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.1.5.tgz#5e5cc49d719bc86522983359bc1f90eddcff0624"
integrity sha512-HnRXrxgHJYJcT8ZDdDCQIlqk0s0skOKD7eWs9mJgBUu70hyW4iA6Kiv3yspJR474RFH8hysKR65VVSzUSzkuwA==
-"@mui/utils@^5.9.1":
- version "5.9.1"
- resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.9.1.tgz#2b2c9dadbf8ba6561e145b5688fb7df5ef15a934"
- integrity sha512-8+4adOR3xusyJwvbnZxcjqcmbWvl7Og+260ZKIrSvwnFs0aLubL+8MhiceeDDGcmb0bTKxfUgRJ96j32Jb7P+A==
+"@mui/utils@^5.4.1", "@mui/utils@^5.9.3":
+ version "5.9.3"
+ resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.9.3.tgz#a11e0824f00b7ea40257b390060ce167fe861d02"
+ integrity sha512-l0N5bcrenE9hnwZ/jPecpIRqsDFHkPXoFUcmkgysaJwVZzJ3yQkGXB47eqmXX5yyGrSc6HksbbqXEaUya+siew==
dependencies:
"@babel/runtime" "^7.17.2"
"@types/prop-types" "^15.7.5"
@@ -1792,10 +1825,10 @@
prop-types "^15.8.1"
react-is "^18.2.0"
-"@mui/utils@^5.9.3":
- version "5.9.3"
- resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.9.3.tgz#a11e0824f00b7ea40257b390060ce167fe861d02"
- integrity sha512-l0N5bcrenE9hnwZ/jPecpIRqsDFHkPXoFUcmkgysaJwVZzJ3yQkGXB47eqmXX5yyGrSc6HksbbqXEaUya+siew==
+"@mui/utils@^5.9.1":
+ version "5.9.1"
+ resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.9.1.tgz#2b2c9dadbf8ba6561e145b5688fb7df5ef15a934"
+ integrity sha512-8+4adOR3xusyJwvbnZxcjqcmbWvl7Og+260ZKIrSvwnFs0aLubL+8MhiceeDDGcmb0bTKxfUgRJ96j32Jb7P+A==
dependencies:
"@babel/runtime" "^7.17.2"
"@types/prop-types" "^15.7.5"
@@ -1803,6 +1836,24 @@
prop-types "^15.8.1"
react-is "^18.2.0"
+"@mui/x-date-pickers@^5.0.0-beta.6":
+ version "5.0.0-beta.6"
+ resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-5.0.0-beta.6.tgz#a8130d5f61ad7411ada1564b2d514123df480668"
+ integrity sha512-8NS3s1uslmmZLl1KVCJ6eu9Wnago0EUdRb4NTCmJOwphE2w7cdI4LP+ZGRH7uWtkb6dQEmum1oumBAB3g4Ix+A==
+ dependencies:
+ "@babel/runtime" "^7.18.6"
+ "@date-io/core" "^2.15.0"
+ "@date-io/date-fns" "^2.15.0"
+ "@date-io/dayjs" "^2.15.0"
+ "@date-io/luxon" "^2.15.0"
+ "@date-io/moment" "^2.15.0"
+ "@mui/utils" "^5.4.1"
+ "@types/react-transition-group" "^4.4.5"
+ clsx "^1.2.1"
+ prop-types "^15.7.2"
+ react-transition-group "^4.4.5"
+ rifm "^0.12.1"
+
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@@ -6676,6 +6727,11 @@ mkdirp@~0.5.1:
dependencies:
minimist "^1.2.6"
+moment@^2.29.4:
+ version "2.29.4"
+ resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
+ integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
+
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
@@ -7747,7 +7803,7 @@ prompts@^2.0.1, prompts@^2.4.2:
kleur "^3.0.3"
sisteransi "^1.0.5"
-prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.8.1:
+prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -8007,7 +8063,7 @@ react-toastify@^9.0.8:
dependencies:
clsx "^1.1.1"
-react-transition-group@^4.3.0:
+react-transition-group@^4.3.0, react-transition-group@^4.4.5:
version "4.4.5"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.5.tgz#e53d4e3f3344da8521489fbef8f2581d42becdd1"
integrity sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==
@@ -8246,6 +8302,11 @@ reusify@^1.0.4:
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
+rifm@^0.12.1:
+ version "0.12.1"
+ resolved "https://registry.yarnpkg.com/rifm/-/rifm-0.12.1.tgz#8fa77f45b7f1cda2a0068787ac821f0593967ac4"
+ integrity sha512-OGA1Bitg/dSJtI/c4dh90svzaUPt228kzFsUkJbtA2c964IqEAwWXeL9ZJi86xWv3j5SMqRvGULl7bA6cK0Bvg==
+
rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"