Calendar
The Calendar module is used for a clear display of events. It allows managing and connecting online private and work calendars together with the IS K2 document calendar in one place.
The calendar allows you to:
- display personal and work events,
- display events created from IS K2 documents,
- change or move event dates.
Events are displayed in the calendar by the date and time they take place. By default, the calendar is displayed in the monthly overview of the current year. You can switch to the weekly or daily view.
Main calendar
In the main calendar, we distinguish two types of calendars:
- Personal calendar (online calendar) - calendar synchronized with the Exchange service
- K2 calendar - calendar based on data from IS K2 documents.
Screen description:
- Navigation panel (black panel on the left side of the screen) - the panel on the left side of the screen is used to switch between individual system areas using icons.
- Calendar tree - used for a clear selection of calendars and for switching them on or off.
- Toolbar - bar used to control the calendar. It allows setting the displayed calendars or switching between view types (daily, weekly, monthly).
- Main area - the main area of the calendar displays the records of the selected calendars (e.g. personal calendar events, partner activities, etc.) in the selected view type (e.g. monthly).

Picture: Main calendar
Description of functions in the toolbar:
|
Clicking this button displays a list of all displayed calendars. The individual calendars (data providers) are distinguished by colour in the calendar.
Picture: Displayed calendars For each calendar, you can:
Picture: Calendar settings
A provider can be deleted from the menu; its data will then not be displayed. Likewise, we can add the provider again at any time. Note:
|
|
Sets the calendar to today's date. |
|
If someone makes changes in the calendar, the calendar can be refreshed and updated with the |
New event in the calendar
A new event is created by right-clicking the selected date in the calendar.
Procedure:
- Right-click the required day or time.
- Select the New event option.
- Select the data provider (e.g. Activities).
- The form for creating a new activity opens.
- After the activity is saved, the event is immediately displayed in the calendar.
Clicking an existing event opens the form of the respective record according to the data provider.
The date and time of an event can be changed directly in the calendar:
- by dragging the event to another day or time,
- by stretching the event over several days or hours.
These operations may be restricted by the settings of the Data provider template. The template can prohibit:
- creating a new event,
- editing a record,
- changing the date,
- dragging a record in the calendar.
Events that have Display as all-day events (without time) set are displayed in the calendar as a rectangle, whereas events with a specified time are displayed with a dot.

Picture: Events in the calendar
Calendar view types
The calendar can be displayed as:
- Monthly
- Weekly
- Daily
For the weekly and daily calendar, two areas are displayed - an area for all-day events and an area for from/to events.

Picture: View type - Month

Picture: View type - Week

Picture: View type - Day
Drag and drop in the calendar
The calendar has two areas with events:
- area for all-day activities
- area for events to be displayed "from-to".
All draggable events in the calendar can be dragged between these areas, which gives us 4 variants.
1. Dragging an all-day event to the all-day events area
- We want to change the date of the event.
- If, for example, the start time of the event (which is not displayed in the calendar) is also specified in the source activity, it is retained for the new date as well.
- The duration of the event is retained. The end date of the event must be shifted by the same time span.

Picture: Dragging an all-day event to the all-day events area
2. Dragging an all-day event to the from/to events area
- We want to change the date of the event.
- We also want to change the start time of the event (which is not displayed in the calendar). In the source activity, the time will be changed to the time to which we dragged the event.
- The duration of the event is retained.
- After the move, the event will still be displayed in the all-day events section.

Picture: Dragging an all-day event to the from/to area
3. Dragging a from/to event to the from/to events area
- We want to change the date or time of the event.
- The duration of the event is retained.

Picture: Dragging a from/to event to the from/to area
4. Dragging a from/to event to the all-day events area
- We want to change the date of the event.
- The start time of the event is retained.
- After the move, the event will still be displayed in the from/to section.

Picture: Dragging a from/to event to the all-day events area
Besides dragging events, it is also possible to stretch/shrink them in the calendar (i.e. change their duration). There are two options:
1. Stretching a from/to event
- The end date and time of the event change exactly to the value to which we drag it in the calendar
2. Stretching an all-day event
- In this case, it is possible to stretch only by days.
- The end date of the event changes to the required day and the end time of the event is retained.
- If we shrink the event to the same day on which it starts, the original end time may be earlier than the start time (e.g. it originally started on Monday evening and ended on Tuesday morning). Logically, an event cannot end before it starts, so in such a case the end time is set to the start time.
Warning: For these moves to work correctly, the field with the event end must be set in the template of the provider of calendar dates and the Event has terminal date option must be checked!
OAUTH authorization settings
The Edit OAUTH authorization settings button
If the user uses an e-mail mailbox on Office365, it is necessary to log in to this service using the OAUTH protocol. This means that the administrator must create a new application for K2 in the Microsoft Entra service and grant it access to Office 365 Exchange Online. For this application, the administrator obtains the ClientID, ClientSecret and TennantId values and enters them in this form.

Picture: Edit OAUTH authorization settings
Description of fields:
UseOAUTH |
Checking the field switches on the use of the OAUTH protocol. |
ClientID, ClientSecret, TennantId |
The administrator obtains the values required for authorization after creating a new application in Microsoft Entra ID. |
Procedure for creating a new application in Microsoft Entra ID









Personal calendar
Data from Exchange calendars can be displayed in the calendar. A new provider through which the data will be displayed is added using the
button. Fill in all fields in the form. Using the Verify connection button, we check whether the connection of the personal calendar to the main calendar was successful. If you have an e-mail mailbox in Office365, it is necessary to configure access using the OAUTH protocol.

Picture: Detail - creating a new personal calendar provider
Basic data - description of fields:
User name |
User name |
Password |
Password |
Email address |
Email address |
MailBoxServer |
Mailbox server (for Office365 it is the value https://outlook.office.com/ews/Exchange.asmx). |
ContactPersonId |
Surname of the contact person to whom the personal calendar belongs. |
For communication with the Exchange server, IS K2 uses an external library that must be registered on the workstation in use. If the error "K2OnlineCalendarProvider.DLL - is not installed or registered!" is displayed after pressing the Verify connection button, this library is not registered on the workstation in use.

Picture: Error when verifying the connection
Registration of the K2OnlineCalendarProvider.dll library For registration, it is necessary to run the command c:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe [path to the IS K2 directory]\k2onlinecalendarprovider.dll (to run this command, it is necessary to have administrator rights). If K2 does not find the registered library, automatic registration of the library starts. Administrator rights are required for automatic registration. A Windows dialog requesting administrator approval pops up. If this dialog is not approved and the registration does not take place, the calendar is suppressed and the user is informed that they must register the library and cancel its suppression. After the suppression is cancelled, the automatic registration starts again. |
After saving, the personal calendar is displayed among the other calendars; alternatively, the Personal calendars button can be used to display a form listing all personal calendars.

Picture: List of personal calendars
A new event (which will be synchronized) is added to the personal calendar by right-clicking the selected date. A menu then appears in which we select New event and choose the required personal calendar. A simplified form is then displayed in which the Subject of the event, location, time and date can be edited, and the event description can also be filled in.

Picture: New personal calendar event
The form header states the personal calendar in which the event will be saved.
Basic data - description of fields:
Subject |
Name of the event |
Place |
Place |
Start date / time |
Start date and time of the event |
End date and time |
End date and time of the event |
All day event |
Flag indicating whether it is an all-day event. |
Event text |
Detailed description of the event |
If it is a recurring event in a series, a form is displayed before the event editing form opens, in which you can choose whether to edit Only this occurrence or The entire series.

Picture: Editing a recurring event in a series
K2 calendar
In the Web K2 environment, the user can select K2 calendars only from an already defined list. Providers of K2 calendar dates are created in IS K2 from the full K2, as described in the chapter Providers of calendar dates. The description of these calendars should be named appropriately so that the user knows on the basis of which data and restricting conditions the calendar is created and whether it is intended for the main calendar or a K2 book.
The K2 calendar can display any header record stored in IS K2 whose data module has a meaningful date field, thanks to which it will be possible to define a template, or a provider of calendar dates.

Picture: List of calendars based on K2 data

