diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-05-17 00:53:51 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-05-17 00:54:41 +0200 |
commit | 24e06a13894f885bbb75b79beaa43d1c6fdfbae5 (patch) | |
tree | 35fe5c358ce3a13bf3700f341e8fe65eeee8790c /module/calp | |
parent | Calendar setting working again! (diff) | |
download | calp-24e06a13894f885bbb75b79beaa43d1c6fdfbae5.tar.gz calp-24e06a13894f885bbb75b79beaa43d1c6fdfbae5.tar.xz |
Rework date-time input to be cleaner + work again.
Diffstat (limited to 'module/calp')
-rw-r--r-- | module/calp/html/vcomponent.scm | 63 |
1 files changed, 27 insertions, 36 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm index 4852390c..7530de91 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -160,44 +160,35 @@ (end (prop ev 'DTEND))) `(div (@ (class "timeinput")) - (input (@ (type "date") - (name "dtstart-date") - (style "grid-column:1;grid-row:2") - (class "bind") - (data-property "--dtstart-date") - (value ,(date->string (as-date start))))) - - (input (@ (type "date") - (name "dtend-date") - (style "grid-column:1;grid-row:3") - (class "bind") - (data-property "--dtend-date") - ,@(when end `((value ,(date->string (as-date end))))))) + ,@(with-label + "Starttid" + `(div (@ (class "date-time bind") + (data-bindby "bind_date_time") + (name "dtstart")) + (input (@ (type "date") + (value ,(date->string (as-date start))))) + (input (@ (type "time") + (value ,(time->string (as-time start))))))) ,@(with-label - "Heldag?" - `(input (@ (type "checkbox") - (class "bind") - (data-bindby "bind_wholeday") - (style "display:none") - (name "wholeday")))) - - (input (@ (type "time") - (name "dtstart-time") - (class "bind") - (data-property "--dtstart-time") - (style "grid-column:3;grid-row:2;" - ,(when (date? start) "display:none")) - (value ,(time->string (as-time start))))) - - (input (@ (type "time") - (name "dtend-time") - (class "bind") - (data-property "--dtend-time") - (style "grid-column:3;grid-row:3;" - ,(when (date? end) "display:none")) - ,@(when end `((value ,(time->string (as-time end))))) - )))) + "Sluttid" + `(div (@ (class "date-time bind") + (data-bindby "bind_date_time") + (name "dtend")) + (input (@ (type "date") + ,@(when end `((value ,(date->string (as-date end))))))) + (input (@ (type "time") + ,@(when end `((value ,(time->string (as-time end))))))))) + + (div + ,@(with-label + "Heldag?" + `(input (@ (type "checkbox") + (class "bind") + (data-bindby "bind_wholeday") + (name "wholeday"))))) + + )) ,@(with-label "Plats" |