Unverified Commit 8d5306b4 authored by Zhou (Link)  Fang's avatar Zhou (Link) Fang Committed by GitHub
Browse files

limited the start data of WG to be today or later (#200)

parent 53bc363f
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
......@@ -10,6 +9,7 @@ const useStyles = makeStyles(() => ({
const DateInput = ({ ariaLabel, onChange, name, value }) => {
const classes = useStyles();
const today = new Date();
return (
<div className="date-input">
......@@ -24,6 +24,7 @@ const DateInput = ({ ariaLabel, onChange, name, value }) => {
InputProps={{
inputProps: {
'aria-labelledby': ariaLabel,
min: today.toISOString().slice(0, 10), //expect yyyy-mm-dd
},
}}
/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment