// ui import { CustomDatePicker } from "components/ui"; import { Tooltip } from "@plane/ui"; import { CalendarCheck } from "lucide-react"; // helpers import { findHowManyDaysLeft, renderFormattedDate } from "helpers/date-time.helper"; // types import { IIssue } from "types"; type Props = { issue: IIssue; onChange: (date: string | null) => void; handleOnOpen?: () => void; handleOnClose?: () => void; tooltipPosition?: "top" | "bottom"; className?: string; noBorder?: boolean; disabled: boolean; }; export const ViewDueDateSelect: React.FC = ({ issue, onChange, handleOnOpen, handleOnClose, tooltipPosition = "top", className = "", noBorder = false, disabled, }) => { const minDate = issue.start_date ? new Date(issue.start_date) : null; minDate?.setDate(minDate.getDate()); return (
{issue.target_date ? ( <> {renderFormattedDate(issue.target_date) ?? "_ _"} ) : ( <> Due Date )}
} minDate={minDate ?? undefined} noBorder={noBorder} handleOnOpen={handleOnOpen} handleOnClose={handleOnClose} disabled={disabled} />
); };