问题描述
我正在尝试禁用以后的时间。我正在使用react-date-time-picker
。这也给我一个错误,“必须声明maxTime和minTime道具”。任何帮助将不胜感激。禁用以后的时间。
<Col sm={4}>
<div>
<label htmlFor="end-time" className="position-relative form-group">Replay End</label>
<InputGroup size = "sm" className="form-control-md">
<DatePicker
showTimeSelect
isClearable
selected={endTime !== "" ? new Date(Number(endTime)*1000) :newDate()}
maxDate={new Date(new Date().getTime())}
//maxTime={new Date().getFullYear()-18,new Date().getMonth(),new Date().getDate()}
onChange={(date) => setDateTime(date.toString(),DateType.END)}
dateFormat="dd/MM/yyyy h:mm aa"
/>
</InputGroup>
</div>
</Col>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)