Skip to content

Commit 3ce7ec9

Browse files
committed
sending the defaultRequiredDate from the webstore
1 parent dc84893 commit 3ce7ec9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/AdditionalInfo/AdditionalInfo.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import {
55
} from 'react-bootstrap'
66
import { addDays, apiV2CompatibleStrings, convertToBase64 } from '../../resources/utilityFunctions'
77

8-
const AdditionalInfo = ({ updateRequestForm }) => {
8+
const AdditionalInfo = ({ defaultRequiredDate, updateRequestForm }) => {
99
const [showProposalDate, setShowProposalDate] = useState(true)
1010
const [files, setFiles] = useState([])
1111
const fileRef = useRef(null)
12-
const oneWeekFromNow = addDays((new Date()), 7).toISOString().slice(0, 10)
1312
const oneDayFromNow = addDays((new Date()), 1).toISOString().slice(0, 10)
1413

1514
const handleChange = (value) => {
@@ -54,7 +53,7 @@ const AdditionalInfo = ({ updateRequestForm }) => {
5453
className='prevent-validation-styles'
5554
type='date'
5655
min={oneDayFromNow}
57-
defaultValue={oneWeekFromNow}
56+
defaultValue={defaultRequiredDate}
5857
placeholder='Proposals Required By'
5958
disabled={showProposalDate === false}
6059
onChange={showProposalDate && ((e) => handleChange(e.target.value))}

0 commit comments

Comments
 (0)