[英]Min and Max value Reactstrap Input Type Date (Calendar)
I'm trying to add a Calendar to my website that makes an appoinment and I need to make it, obviously, from today to the future.我正在尝试在我的网站上添加一个日历来进行预约,显然,我需要从今天到未来。 How can I do that with the Reactstrap component?
我如何使用 Reactstrap 组件做到这一点? Can't find on docs.
在文档上找不到。
Importing the Calendar:导入日历:
import { Input } from "reactstrap";
<Input
type="time"
className="form-control"
id="time-start-input"
value={startTime}
onChange={(e) => {
setTime(e.target.value);
}}
/>
How can I put a minValue to receive dates just after that date?如何在该日期之后放置 minValue 来接收日期? For example:
例如:
minValue={today}
And then, disable the past.然后,禁用过去。
Regarding the doc of Reactstrap Datepicker, you can use the minDate: https://reactstrap-date-picker.afialapis.com/#mindate关于 Reactstrap Datepicker 的文档,您可以使用 minDate: https://reactstrap-date-picker.afialapis.com/#mindate
<FormGroup>
<Label>My Date Picker</Label>
<DatePicker
id = "example-datepicker"
minDate={"2016-05-19T12:00:00.000Z"}
<FormText>Help</FormText>
</FormGroup>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.