fix: module start and target date validations (#1914)

This commit is contained in:
Aaryan Khandelwal 2023-08-21 11:46:02 +05:30 committed by GitHub
parent 2eb956e97e
commit 0bccb63a9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 35 deletions

View file

@ -17,7 +17,7 @@ type Props = {
export const IssueDateSelect: React.FC<Props> = ({ label, maxDate, minDate, onChange, value }) => (
<Popover className="relative flex items-center justify-center rounded-lg">
{({ open }) => (
{({ close }) => (
<>
<Popover.Button className="flex cursor-pointer items-center rounded-md border border-custom-border-200 text-xs shadow-sm duration-200">
<span className="flex items-center justify-center gap-2 px-2 py-1 text-xs text-custom-text-200 hover:bg-custom-background-80">
@ -52,6 +52,8 @@ export const IssueDateSelect: React.FC<Props> = ({ label, maxDate, minDate, onCh
onChange={(val) => {
if (!val) onChange("");
else onChange(renderDateFormat(val));
close();
}}
dateFormat="dd-MM-yyyy"
minDate={minDate}