Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: end date picker allows to select invalid value #21

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import "./style.css";
import { DatePicker } from "antd";
import dayjs from "dayjs";
import React, { useState } from "react";
import "./style.css";

interface Props {
readonly startLabel?: string;
Expand Down Expand Up @@ -64,7 +64,7 @@ const BondscapeDateTimePicker = ({
value={initialStartValue ? dayjs(initialStartValue) : undefined}
disabledDate={
maxDate
? (current) => current < maxDate
? (current) => current > maxDate
: (current) => current < dayjs()
}
onChange={(date) => {
Expand Down
2 changes: 1 addition & 1 deletion app/creator/create/[[...id]]/CreateTicketCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const CreateTicketCategory = ({
setFieldValue("availableFrom", value)
}
onChangeEnd={(value) =>
setFieldValue("availableTill", value)
setFieldValue("availableUntil", value)
}
/>
<div className="flex flex-col bg-bondscape-text_neutral_100 rounded-[16px] gap-[0.75rem] py-[16px]">
Expand Down