@@ -3,13 +3,14 @@ import PropTypes from 'prop-types'
3
3
import {
4
4
Card , CloseButton , Form , ListGroup ,
5
5
} from 'react-bootstrap'
6
- import { convertToBase64 , apiV2CompatibleStrings } from '../../resources/utilityFunctions'
6
+ import { addDays , apiV2CompatibleStrings , convertToBase64 } from '../../resources/utilityFunctions'
7
7
8
8
const AdditionalInfo = ( { updateRequestForm } ) => {
9
9
const [ showProposalDate , setShowProposalDate ] = useState ( true )
10
10
const [ files , setFiles ] = useState ( [ ] )
11
- const today = new Date ( ) . toISOString ( ) . slice ( 0 , 10 )
12
11
const fileRef = useRef ( null )
12
+ const oneWeekFromNow = addDays ( ( new Date ( ) ) , 7 ) . toISOString ( ) . slice ( 0 , 10 )
13
+ const oneDayFromNow = addDays ( ( new Date ( ) ) , 1 ) . toISOString ( ) . slice ( 0 , 10 )
13
14
14
15
const handleChange = ( value ) => {
15
16
updateRequestForm ( value , 'proposedDeadline' )
@@ -52,7 +53,8 @@ const AdditionalInfo = ({ updateRequestForm }) => {
52
53
< Form . Control
53
54
className = 'prevent-validation-styles'
54
55
type = 'date'
55
- min = { today }
56
+ min = { oneDayFromNow }
57
+ defaultValue = { oneWeekFromNow }
56
58
placeholder = 'Proposals Required By'
57
59
disabled = { showProposalDate === false }
58
60
onChange = { showProposalDate && ( ( e ) => handleChange ( e . target . value ) ) }
0 commit comments