Skip to content

Commit

Permalink
feat(web/input): min and max date
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWasTakenn committed Jan 14, 2023
1 parent d621aca commit 5245e27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/src/features/dialog/components/fields/date.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const DateField: React.FC<Props> = (props) => {
inputFormat="DD/MM/YYYY"
withAsterisk={props.row.required}
clearable={props.row.clearable}
minDate={props.row.min ? new Date(props.row.min) : undefined}
maxDate={props.row.max ? new Date(props.row.max) : undefined}
/>
);
};
Expand Down
3 changes: 3 additions & 0 deletions web/src/interfaces/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,7 @@ export interface IDateInput {
description?: string;
required?: boolean;
placeholder?: string;
clearable?: boolean;
min?: string;
max?: string;
}

0 comments on commit 5245e27

Please sign in to comment.