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

Calendar item header and content color is not applied correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 3.1.1
    • OpenJDK 17

      Spring Boot 2.5.14

      ZK 9.6.2

      ZkSpringBoot 2.5.12

       

      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();
      

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

              Created:
              Updated: