Merge pull request #793 from lethemanh/774-fix-date-time-layout-allday
#774 fix issue of date time layout allday
This commit is contained in:
@@ -24,8 +24,8 @@ export function useDateTimeLayout({
|
|||||||
showEndDate
|
showEndDate
|
||||||
}: DateTimeLayoutProps): LayoutMode {
|
}: DateTimeLayoutProps): LayoutMode {
|
||||||
return useMemo(() => {
|
return useMemo(() => {
|
||||||
const isSpecialRange = hasEndDateChanged || (!allday && spansMultipleDays)
|
const isSpecialRange = hasEndDateChanged || spansMultipleDays
|
||||||
if (showMore || isSpecialRange) {
|
if (!allday && (showMore || isSpecialRange)) {
|
||||||
return LAYOUT_MODE.EXPANDED
|
return LAYOUT_MODE.EXPANDED
|
||||||
}
|
}
|
||||||
if (allday || showEndDate) return LAYOUT_MODE.ALL_DAY
|
if (allday || showEndDate) return LAYOUT_MODE.ALL_DAY
|
||||||
|
|||||||
Reference in New Issue
Block a user