diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-07-03 01:50:20 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-07-03 01:50:20 +0530 |
commit | f6186b99bca2b25a4c91d6223c08b03c1cccb933 (patch) | |
tree | f5c49de8eef173bc0ff746e197b6efa660930ca6 /src/components | |
parent | 2f9d7e2584330fdabc351ea3d04bade1104e5aa5 (diff) |
Added datepicker with custom css
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Form/Document/DocumentInfoForm.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/components/Form/Document/DocumentInfoForm.tsx b/src/components/Form/Document/DocumentInfoForm.tsx index 18d0be5..6135b33 100644 --- a/src/components/Form/Document/DocumentInfoForm.tsx +++ b/src/components/Form/Document/DocumentInfoForm.tsx @@ -7,9 +7,12 @@ */ import React, { useState } from "react"; +import DatePicker from "react-datepicker"; +import "./../../../styles/datepicker.scss"; // custom datepicker css +// import "react-datepicker/dist/react-datepicker.css"; import { Person } from "./../../../interfaces"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faSync } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faSync } from '@fortawesome/free-solid-svg-icons'; import "./../Form.scss"; import SelectClientForm from "./../People/SelectClientForm"; @@ -23,6 +26,7 @@ interface Props { const DocumentInfoForm: React.FC<Props> = (props) => { const [invoiceNumber, setInvoiceNumber] = useState<number>(props.invoiceNumber); + const [invoiceDate, setInvoiceDate] = useState(new Date()); return ( <div className={"DocumentInfoForm"}> <SelectClientForm @@ -48,7 +52,8 @@ const DocumentInfoForm: React.FC<Props> = (props) => { </label> <label> - Invoice Date: <span>wtf do i do</span> + Invoice Date: + <DatePicker className={"smallInputBox"} selected={invoiceDate} onChange={(date: Date) => setInvoiceDate(date)} /> </label> </div> |