javascript - 材质ui表,单元格编辑日期验证
问题描述
我正在使用材料表https://github.com/mbrn/material-table,我的问题是
编辑单元格时如何验证日期[活动-非活动]?
我的代码:
{ title: 'Active', field: 'active', type: "date"},
{ title: 'Inactive', field: 'inactive', type: "date",
editComponent: props => (
<input
type="date"
value={props.value}
onChange={e => props.onChange(e.target.value)}
min={props.rowData.active}
InputProps={{inputProps: {min: props.rowData.active}}}
/>)},
我正在使用此代码但不起作用,仍然允许我在活动之前选择非活动日期。我放了 min(active),有人知道如何解决这个问题吗?谢谢
解决方案
推荐阅读
- javascript - 从 setTimeout 调用生成器函数
- php - 如何根据php中的字段过滤数组?
- amazon-web-services - 为什么我的用户会收到此与 AWS 相关的错误?
- tensorflow - tensorflow benchmark工具的结果解读
- css - 如何在反应表中添加淡入淡出效果?
- reactjs - 在 SPA (React JS) 中针对 Azure AD 组授权用户的最佳方式
- vim - Vim:自定义 grep 查找文件但不打开它们
- mysql - 在论坛上获取某个类别的最新帖子
- java - tomcat8 - 外部 jars 目录可用于 webapp
- python - Python – 不检索所有 json 对象,只检索最后一个