Skip to content

Commit 3a9c807

Browse files
[update] remove info about the hourScaleWidth and hourHeight deleted properties. Add extra info about configuring hour scale parameters
1 parent 111f4a0 commit 3a9c807

File tree

2 files changed

+56
-5
lines changed

2 files changed

+56
-5
lines changed

docs/guides/configuration.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,16 @@ The **Day** and **Week** view modes can be set in the following way:
9393
- enables/disables an ability to overlay events `eventsOverlay: boolean`
9494
- a step of moving events via d-n-d `timeStep: number`
9595
- an array with start and end time of day `timeRange: array`
96-
- a column width of the "hour" scale `hourScaleWidth: number`
97-
- a row height of the "hour" scale `hourHeight: number`
9896
- a space between events (px) `eventMargin: string`
9997
- a right padding of the grid column (px) `columnPadding: string`
10098

101-
~~~jsx {3-10,15-29}
99+
~~~jsx {3-8,13-27}
102100
// settings of the "Day" and "Week" modes
103101
const day_and_week_settings = {
104102
eventHeight: 40,
105103
eventsOverlay: false,
106104
timeStep: 15,
107105
timeRange: [9, 19],
108-
hourScaleWidth: 50,
109-
hourHeight: 40,
110106
eventMargin: "20px", // if "eventsOverlay: false" only
111107
columnPadding: "150px"
112108
};
@@ -131,6 +127,31 @@ config: {
131127
}
132128
~~~
133129

130+
:::tip
131+
The **hour height** of the time scale in **Day** and **Week** views is defined by the `--wx-event-calendar_hour-cell-height` css variable and can be specified in css:
132+
133+
~~~css
134+
.wx-event-calendar{
135+
--wx-event-calendar_hour-cell-height: 100px !important;
136+
}
137+
~~~
138+
139+
This value can be modified at any time the event will adjust its position automatically and will be displayed at correct position relatively to the time scale.
140+
141+
The **hour width** of the time scale is defined by the `--wx-event-calendar_hour-scale-width` variable:
142+
143+
~~~css
144+
.wx-event-calendar{
145+
--wx-event-calendar_hour-cell-width: 100px !important;
146+
}
147+
~~~
148+
149+
:::note
150+
The ***!important*** directive is required for this style to work!
151+
:::
152+
153+
#### Month view mode
154+
134155
The **Month** view mode can be set in the following way:
135156

136157
- a height of multievents `eventHeight: number` (*common config for all view modes*)
@@ -159,6 +180,8 @@ config: {
159180
}
160181
~~~
161182

183+
#### Timeline view mode
184+
162185
The **Timeline** view mode can be set in the following way:
163186

164187
~~~jsx {3-19,24-32}

docs/howtos.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,34 @@ In this section you can find out how to work with an events editor
117117
| [Reordering inner events](api/internal/js_eventcalendar_setnext_method.md) | Learn how to add the inner event into the Event Bus order |
118118
| [Subscribing on inner events](api/internal/js_eventcalendar_on_method.md) | Learn how to subscribe on the inner event |
119119

120+
## How to work with view modes
121+
122+
In this section you can find out how to configure and customize view modes
123+
124+
### Configuring the hour scale in Day/Week views
125+
126+
The **hour height** of the time scale in **Day** and **Week** views is defined by the `--wx-event-calendar_hour-cell-height` css variable and can be specified in css:
127+
128+
~~~css
129+
.wx-event-calendar{
130+
--wx-event-calendar_hour-cell-height: 100px !important;
131+
}
132+
~~~
133+
134+
This value can be modified at any time the event will adjust its position automatically and will be displayed at correct position relatively to the time scale.
135+
136+
The **hour width** of the time scale is defined by the `--wx-event-calendar_hour-scale-width` variable:
137+
138+
~~~css
139+
.wx-event-calendar{
140+
--wx-event-calendar_hour-cell-width: 100px !important;
141+
}
142+
~~~
143+
144+
:::important
145+
The ***!important*** directive is required for this style to work!
146+
:::
147+
120148
## How to work with REST API
121149

122150
| Topic | Description |

0 commit comments

Comments
 (0)