bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

NonWorkingTime feature should have a config to specify what header levels should be highlighted #819

Open pmiklashevych opened 4 years ago

pmiklashevych commented 4 years ago

https://www.bryntum.com/forum/viewtopic.php?f=44&t=14115

http://lh/bryntum-suite/scheduler/examples/basic/

const scheduler = new Scheduler({
    features : {
        nonWorkingTime : true
    },
    adopt            : 'container',
    minHeight        : '20em',
    resources        : resources,
    events           : events,
    startDate        : new Date(2017, 0, 1),
    endDate          : new Date(2017, 1, 1),
    viewPreset       : {
        base       : 'dayAndWeek',
        tickHeight : 30,
        tickWidth  : 16,
        headers    : [
            {
                unit       : 'week',
                dateFormat : 'MMMM-YYYY'
            },
            {
                unit       : 'day',
                dateFormat : 'D'
            },
            {
                unit       : 'day',
                dateFormat : 'd1'
            }
        ]
    },

See highlights only bottom level header

Снимок экрана 2020-05-21 в 14 16 14
pmiklashevych commented 4 years ago

For now it has only showHeaderElements config which allows to disable header highlighting completely. Can be a number to define how many levels should be covered. 1 by default, 0 to do not show (or false). Set a special css class depends on that config and provide corresponding styles.

pmiklashevych commented 4 years ago

Temporary override can be used to specify additional style like:

.b-grid-header.b-sch-timeaxiscolumn-levels-3 .b-sch-timerange.b-sch-nonworkingtime {
    height: 66.66666%; // to highlight bottom and middle header
}