feat(web/input): min and max date

This commit is contained in:
Luke
2023-01-14 13:36:30 +01:00
parent d621aca29f
commit 5245e27a75
2 changed files with 5 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ const DateField: React.FC<Props> = (props) => {
inputFormat="DD/MM/YYYY" inputFormat="DD/MM/YYYY"
withAsterisk={props.row.required} withAsterisk={props.row.required}
clearable={props.row.clearable} clearable={props.row.clearable}
minDate={props.row.min ? new Date(props.row.min) : undefined}
maxDate={props.row.max ? new Date(props.row.max) : undefined}
/> />
); );
}; };

View File

@@ -76,4 +76,7 @@ export interface IDateInput {
description?: string; description?: string;
required?: boolean; required?: boolean;
placeholder?: string; placeholder?: string;
clearable?: boolean;
min?: string;
max?: string;
} }