fix: blackout UI, validation and browser related issues [TNL-8667] (#199)

* fix: spacing issue between blackout dates and status badge [TNL-8808]

* fix: display date and time for multi month and year date range  [TNL-8803]
This commit is contained in:
Awais Ansari
2021-10-15 11:24:47 +05:00
committed by GitHub
parent 2f4a19d413
commit 9198dc5c64
2 changed files with 8 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ const CollapseCardHeading = ({
return (
<div className="py-2">
{badgeStatus && <Badge variant={badgeVariant}>{badgeStatus}</Badge>}
<div>{collapseHeadingText}</div>
<div className="mt-2">{collapseHeadingText}</div>
</div>
);
};

View File

@@ -62,21 +62,21 @@ export const formatBlackoutDates = ({
${mStartDate.format('MMMM D')} -
${mEndDate.format('D, YYYY')}
`;
} else if (hasSameMonth && isTimeAvailable) {
formattedDate = `
${mStartDateTime.format('MMMM D, YYYY, h:mma')} -
${mEndDateTime.format('MMMM D, YYYY, h:mma')}
`;
} else if (!hasSameMonth && hasSameYear) {
} else if (!hasSameMonth && hasSameYear && !isTimeAvailable) {
formattedDate = `
${mStartDate.format('MMMM D')} -
${mEndDate.format('MMMM D, YYYY')}
`;
} else if (!hasSameMonth && !hasSameYear) {
} else if (!hasSameMonth && !hasSameYear && !isTimeAvailable) {
formattedDate = `
${mStartDate.format('MMMM D, YYYY')} -
${mEndDate.format('MMMM D, YYYY')}
`;
} else {
formattedDate = `
${mStartDateTime.format('MMMM D, YYYY, h:mma')} -
${mEndDateTime.format('MMMM D, YYYY, h:mma')}
`;
}
return formattedDate;
};