Uploaded image for project: 'ZK Calendar'
  1. ZK Calendar
  2. ZKCAL-100

Calendar item header and content color is not applied correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Environment:

      OpenJDK 17

      Spring Boot 2.5.14

      ZK 9.6.2

      ZkSpringBoot 2.5.12

       

      Description

      Steps to Reproduce

      Create a calendar item and set header or content color :

       

      final DefaultCalendarItem defaultCalendarItem = new DefaultCalendarItem.Builder()
              .withTitle("test title")
              .withContent("test content")
              .withHeaderColor("#f58231")
              .withLocked(true)
              .withBegin(LocalDateTime.now())
              .withEnd(LocalDateTime.now().plusHours(2))
              .withZoneId(ZoneId.of("Europe/Zurich"))
              .build();
      simpleCalendarModel.add(defaultCalendarItem);
      

       

      Current Result

      The color is not applied.

      By looking at the generated HTML, we can see the style attribute is not correct :

      style=" #f58231"
      

      Expected Result

      The color should be applied.

      Debug Information

       

      Workaround

      As a workarround, specify CSS property name when setting the color :

      new DefaultCalendarItem.Builder()
        ...
        .withHeaderColor("background-color:#f58231")
        .withContentColor("color:#fe08ff")
        .build();
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            YannUnil YannUnil
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: