Comflow Documentation

Comflow Documentation

  • Comflow 2.22

›Datepicker Exceptions

Presentation

  • Release Notes
  • Migration Notes
  • Master Sitedef

Chart Implementations

  • Comflow Chart Implementations
  • Comflow Custom Chart Setup

Comflow IPP

  • Comflow IPP Basics
  • Using ppd files
  • Windows Printer Server Setup

Comflow Styling

  • Comflow Styling Basics
  • _config.scss
  • _custom-class.scss
  • Portal Header

Copy to Clipboard

  • Copy to Clipboard Basics
  • External Resources

Datepicker Exceptions

  • Datepicker Exceptions

Desktop Functions

  • Desktop Functions Basics
  • Modes
  • Style

My Functions

  • My Functions Basics

My Settings

  • My Settings Basics

Open API

  • OpenAPI Basics

Portal Menu Options

  • Portal Menu Options Basics
  • Mega Menu
  • Side Menu
  • Top Menu

Quick Search

  • Quick Search Basics

Quick Start

  • Quick Start Basics

Removed Classes/Methods

  • AbstractEnvironment
  • AbstractSegmentChangeObject
  • ApplicationObject
  • CadModel
  • ChangeObject
  • Changes in Rendering Classes
  • ClientInfo
  • Component
  • CoreSessionManager
  • DataInstance
  • Database
  • DriverHelper
  • DynamicModels
  • Environment
  • ErrorUtils
  • FieldChangeObject
  • Field
  • FlexIdImplementation
  • FlexId
  • Introduction
  • Logical Unit of Work
  • PromptRequest
  • RendererInfo
  • RendererModelUtils
  • RendererModel
  • RepositoryUtil
  • Root
  • SegmentChangeObjectImpl
  • SegmentChangeObject
  • SessionMessage
  • SimpleModel
  • Site
  • StringUtil
  • SystemWorkspace

Repository Constant

  • Repository Constant Basics

Sitedef

  • Site definition Settings

Sound Events

  • Sound Events Basics
  • Sound Events in Errors
  • Sound Events in Rules
  • Test Case in Verify

User Avatar

  • User Avatar Basics
  • Changes in Classes and Tables
  • References

User Info

  • User Info Basics

Datepicker Exceptions

Since 2.22.3 (with patch), it’s possible to add calendar exceptions to datepickers in Comflow.

Enable Exceptions

Datepicker exceptions are enabled and disabled with a property in sitedef. Default value is false. This property will control all datepickers.

<Property name="portal.datepicker.calendar.exceptions.show" value="true"/>
<!-- Possible values are true and false. Default value is false.-->

The property value can be retrieved with method net.comactivity.core.site.Site#getPortalDatePickerCalendarExceptionsShow.

Exceptions Service

If datepicker exceptions are enabled, a custom service needs to be defined in sitedef.

<Property name="portal.datepicker.calendar.exceptions.url" value="CustomDatepickerExceptionsService"/>
<!-- Possible values are registered application services. -->

The property value can be retrieved with method net.comactivity.core.site.Site#getPortalDatePickerCalendarExceptionsURL.

Request Format

The request will have four query parameters; sessionId, clientId, fromDate, and toDate.

ParameterDescription
sessionIdSession ID
clientIdSynthetic ID of field with datepicker
fromDateStart of date range in ISO 8601 Extended format, YYYY-MM-DDTHH:mm:ss:sssZ
toDateInclusive end of date range in ISO 8601 Extended format, YYYY-MM-DDTHH:mm:ss:sssZ

Response Format

The expected response from an exceptions service is a list of object with properties "day", "month", "year", and "description".

Example

[
    {
        "day": 25,
        "month": 12,
        "year": 2019,
        "description": "Christmas Day"
    }
]

Datepicker Field

In order to distinguish between different datepickers, and use different calendar exceptions, field can be resolved from clientId.

String dialogId = RendererModel.getDialogIdFromClientId(clientId);
DialogWorkspace dialogWorkspace = sessionWorkspace.getDialogWorkspace(dialogId);
RendererModel rendererModel = dialogWorkspace.getRendererModel();

Field field = rendererModel.parseClientIdFromViewModel(clientId).getField();
String metadataId = field.getMetadataId();
String tableId = field.getTable();
String columnName = field.getName();

Style Datepicker Exceptions

It is also possible to add custom style to datepicker exceptions. Override or add properties to class CA-dtpCalendarCellHoliday in the Custom.css.

/* Set color 'Dark Sea Green' for all calendar exceptions */
.CA-dtpCalendarCellHoliday {
  color: darkseagreen;
}
← External ResourcesDesktop Functions Basics →
Comflow Documentation
Docs
Corzia Info
Community
User ShowcaseCorzia WebsiteTwitter
More
Update Sitetech@corzia.com
Copyright © 2019 Corzia AB