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:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user