aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-08-06 20:33:47 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-08-06 20:33:47 +0200
commit6a580dd048bf326c40245f05b5700c1b3274e182 (patch)
tree11673be33daf982a972067dc7d4016137c297d32
parentFix popup error on long event creation. (diff)
downloadcalp-6a580dd048bf326c40245f05b5700c1b3274e182.tar.gz
calp-6a580dd048bf326c40245f05b5700c1b3274e182.tar.xz
Fix time when creating from month view.
-rw-r--r--module/output/html.scm7
1 files changed, 2 insertions, 5 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 9aacfebe..1f1fed46 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -478,6 +478,7 @@
(define*-public (render-calendar-table key: events start-date end-date pre-start post-end #:allow-other-keys)
(define-values (long-events short-events)
+ ;; TODO should be really-long-event? or event-spanning-midnight
(partition really-long-event? (stream->list (events-between pre-start post-end events))))
(define short-event-groups
@@ -505,15 +506,11 @@
(weekday-list (get-config 'week-start)))
,@(map (lambda (group i)
(let* (((s e . events) group))
- ;; These divs support dragging to create events.
- ;; They have correct size when draging, but are
- ;; then created with completely wrong start and
- ;; end times. TODO
`(div (@ (class "cal-cell longevents event-container")
(style "grid-area: long " ,i ";"
"grid-column: 1 / span 7;")
(data-start ,(date->string s))
- (data-end ,(date->string e)))
+ (data-end ,(date->string (add-day e))))
,@(lay-out-long-events
s e events))))
long-event-groups