Ask for help related to our Calendar 2.x version


Post by lijuan.zhang »

I have two questions.

  1. Please refer the ① on the picture. How to set the cell color (grid left/right border color)?
    The default color is too light. Could I modify it to dark color?

  2. Please refer the ② on the picture. How to set the schedule width(not cover 100% of cell)? The spacing between schedules should be kept.

Thanks very much.

Attachments
20210330.PNG
20210330.PNG (62.62 KiB) Viewed 743 times

Post by mats »

  1. CSS:

    .cal-sch-view-week .x-grid-cell {
        border-color: #333;
    }
  2. You can try this piece of basic CSS:

    .cal-sch-view-week .sch-event {
        max-width: 90%;
    }

Tired of debugging javascript errors in web applications? Try our powerful error logging service RootCause


Post by lijuan.zhang »

Thank you very much.

  1. CSS (.cal-sch-view-week .x-grid-cell)
    I added the "!important" for border-color. It works fine. Thanks very much.

  2. CSS (.cal-sch-view-week .sch-event)
    It works for single event, but It does not work for multiple events which are at same time.
    Please refer to the attachment.
    Could you help me to fix it for the case of multiple events.

Thanks very much.

Attachments
20210331.PNG
20210331.PNG (106.61 KiB) Viewed 726 times

Post by pmiklashevich »

You can set barMargin for the weekview and dayview modes:

    modes : {
        day : {
            view : {
                barMargin : 10
            }
        },
        week : {
            view : {
                barMargin : 10
            }
        },

https://www.bryntum.com/docs/calendar-for-extjs/#!/api/Cal.view.SchedulerGrid-cfg-barMargin
https://www.bryntum.com/docs/calendar-for-extjs/#!/api/Cal.panel.Calendar-cfg-modes

barMargin should add space between events, but in vertical and weeview schedulers it adds space only before the first and after the last event in the column. I've opened a ticket to get it fixed: https://app.assembla.com/spaces/bryntum/tickets/9644-there-is-no-space-between-events-when-barmargin-is-set-in-vertical-and-wee/details

Let me know please if the current implementation is what you need and you don't need to have space between events. In this case we might add a flag for backward compatibility.

Pavel Miklashevich - Core Developer

Post by lijuan.zhang »

The solution is perfect. That's what I want.
Thank you very much.


Post Reply