Skip to content

Commit

Permalink
Отключает предшествующие даты текущему дню
Browse files Browse the repository at this point in the history
  • Loading branch information
Seasle committed Dec 17, 2023
1 parent d7be56a commit a13a119
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/entities/task/ui/task-create-form/ui/TaskCreateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ interface TaskCreateFormValues {
expiresIn: Date | null;
}

const today = new Date();

export const TaskCreateForm = ({ id, context }: ContextModalProps) => {
const { ref, key } = useDelayedKeyOnResize(50);
const form = useForm<TaskCreateFormValues>({
Expand Down Expand Up @@ -79,6 +81,7 @@ export const TaskCreateForm = ({ id, context }: ContextModalProps) => {
label="Срок выполнения"
placeholder="А он нужен?"
valueFormat="DD.MM.YYYY"
minDate={today}
rightSection={
<CloseButton
aria-label="Очистить поле"
Expand Down

0 comments on commit a13a119

Please sign in to comment.