mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-27 11:06:50 +03:00
Calendar hour fix (#2151)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
c7e916abd1
commit
c3d5c962cb
@ -47,8 +47,8 @@
|
||||
return `${(new Date(e.date).getMinutes() / 60) * 100}%`
|
||||
}
|
||||
|
||||
function getHeight (e: Event): string {
|
||||
if (e.dueDate !== undefined) {
|
||||
function getHeight (e: Event, date: Date): string {
|
||||
if (e.dueDate !== undefined && new Date(e.dueDate).getHours() === date.getHours()) {
|
||||
return `${(new Date(e.dueDate).getMinutes() / 60) * 100}%`
|
||||
}
|
||||
return '100%'
|
||||
@ -84,7 +84,7 @@
|
||||
res += ` top: ${getTop(e)};`
|
||||
}
|
||||
if (endCell(e.dueDate ?? e.date, date)) {
|
||||
res += ` height: ${getHeight(e)};`
|
||||
res += ` height: ${getHeight(e, date)};`
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user