DatePicker
A DatePicker is a control element that allows the user to select a date from a calendar. It is based on the Kendo UI DatePicker. The date can be entered manually or selected from a calendar.
<div
    id="pg_date"
    data-hf-control="DatePicker"
    data-hf-options="{
        defaultValue: 'now',
        required: true,
        label: 'Date',
        emptyContent : 'Select...',
        list: true
    }"
></div>
FormControl Options​
Options of the kendo component are also available. read more
convertToLocalDate​
If set to true, the selected date is converted to the local date of the device.
How to use: 
convertToLocalDate: trueType: 
booleandefaultValue​
Use the value "now" to offer the current ('local') date. A Custom Code function can be used to set defaultValue.
How to use: 
defaultValue: 'now'Type: 
string | functionSignature: 
function() => string | DatedisableCalendar​
Set "true" whenever the DatePicker control calendar flyout should be disabled.
How to use: 
disableCalendar: trueType: 
booleandisabled​
Set "true" whenever the DatePicker should be disabled.
How to use: 
disabled: trueType: 
booleandisplayValueFormat​
To change the format of the displayed date. For more information visit: https://docs.telerik.com/kendo-ui/framework/globalization/dateformatting.
How to use: 
displayValueFormat: 'dd.MM.yyyy'Type: 
stringdoNotCopy​
Set "true" whenever the field should be cleared if the Form is copied.
How to use: 
doNotCopy: trueType: 
booleanemptyContent​
Write a short word to indicate that the appropriate date can/must be chosen.
How to use: 
emptyContent: 'Select ...'Type: 
stringlist​
Set this property to "true" if data connected with this control should be a sorting/filtering/grouping option on the ListPage, is used in template objects (eg. the listTemplate) or it should show up in Admin UI listings.
How to use: 
list: trueType: 
booleanlistOptions​
Set additional options for controls with list equals true. E.g. set custom label for filter/sort/group dialogs or hide them completely.
How to use: 
Type: 
{ dialogText: string, dialogHide: boolean }max​
Set to allow entries up to until this date. With "now" the newest possible entry is the current day. Format for fixed dates is yyyy-MM-dd.
How to use: 
max: 'now'Type: 
stringmin​
Set to allow entries from that date on. Format is yyyy-MM-dd.
How to use: 
min: '1965-05-14'Type: 
stringDefault: 
1900-01-01mobilePicker​
Use native date picker on mobile devices. There are settings restrictions e.g. formatting or start interval.
How to use: 
mobilePicker: trueType: 
booleanonChanged​
Call a pre-defined JS-method to do something when the status of the control changes.
How to use: 
onChanged: HFFormdefinition.Namespace.MethodType: 
functionSignature: 
function(value: Date) => voidparseFormats​
Used to give the user several format options to type in the date. "Converts" the date to format which is set with displayValueFormat.
How to use: 
parseFormats: ['ddMMyyyy', 'dd/MM/yyyy', 'dd-MM-yyyy']Type: 
string[]persistent​
It is the value where the "user" sets the initial value of the DatePicker to the value of  the previous Form item of the current user and overwrites any defaultValue.
How to use: 
persistent: 'user'Type: 
'user'start​
Used to control which area the DatePicker view starts when opened. Allowed values: month / year / decade / century.
How to use: 
start: 'decade'Type: 
month | year | decade | centuryDefault: 
monthtooltip​
Write a comment to provide further information about the field. A question mark will then be shown within the label and with a click/tap on it, the information will occur.
How to use: 
tooltip: 'Please indicate at least one cause of damage.'Type: 
stringtooltipTemplate​
Write an ID of an HTML container to provide further information about the field. A question mark will then be shown within the label and with a click/tap on it, the content of the container will occur.
How to use: 
tooltipTemplate: 'example_control_tooltip'Type: 
stringvisiting​
Set "true" whenever the Form element should be marked as "visited" when the user has clicked or tapped at the Form field.
How to use: 
visiting: trueType: 
booleanlistOptions Object​
dialogText​
Set custom label for filter/sort/group dialogs.
How to use: 
dialogText: 'Display Text'Type: 
stringcopyValueTo​
Define FormControls in which the entered value should be copied.
Example
<div
    id="datepicker_field_copy_source"
    data-hf-control="DatePicker"
    data-hf-options="{
    label: 'DatePicker: source',
    displayValueFormat: 'dd.MM.yyyy',
    parseFormats: ['dd.MM.yyyy', 'ddMMyyyy', 'dd/MM/yyyy', 'dd-MM-yyyy', 'd.M.yy', 'ddMMyy', 'd/M/yy', 'd-M-yy'],
    copyValueTo: [{
        targetId: 'datepicker_field_copy_target_1'
    }, {
        targetId: 'datepicker_field_copy_target_2',
        shadowPostfix: '_HFDate'
    }]
}"
></div>
Option interface
interface ICopyValueToObject {
    targetId: string;
    mode: 'overwrite' | null;
    shadowPostfix: string;
    callback: (value: string) => string;
}
type CopyValueToType = string | ICopyValueToObject | Array<string | ICopyValueToObject>;
callback​
Specify a function to process value before copy.
How to use: 
callback: HFFormDefinition.Namespace.processValueType: 
functionSignature: 
function(value: string) => stringmode​
Specify if target field gets overwritten. Default behaviour is to only copy to empty fields.
How to use: 
mode: 'overwrite'Type: 
stringshadowPostfix​
Specify which shadow field is copied.
How to use: 
shadowPostfix: '_HFNumericField'Type: 
stringcopyValueFrom​
Define a FormControl that synchronizes its value with the current field. This synchronization process occurs upon navigating to the page where the current control is situated. It only occurs if the field is empty or the mode is set to "overwrite".
<div
    id="datepicker_field_copy_target"
    data-hf-control="DatePicker"
    data-hf-options="{
    label: 'DatePicker: source',
    displayValueFormat: 'dd.MM.yyyy',
    parseFormats: ['dd.MM.yyyy', 'ddMMyyyy', 'dd/MM/yyyy', 'dd-MM-yyyy', 'd.M.yy', 'ddMMyy', 'd/M/yy', 'd-M-yy'],
    copyValueFrom: 'datepicker_field_copy_source_1'
}"
></div>
Option interface
interface ICopyValueFromObject {
    sourceId: string;
    mode: 'overwrite' | null;
    callback: (value: string) => string;
}
type CopyValueFromType = string | ICopyValueFromObject;
callback​
Specify a function to process value before copy.
How to use: 
callback: HFFormDefinition.Namespace.processValueType: 
functionSignature: 
function(value: string) => stringmode​
Specify if target field gets overwritten. Default behaviour is to only copy to empty fields.
How to use: 
mode: 'overwrite'Type: 
stringStored data
​<div
    id="pg_date"
    data-hf-control="DatePicker"
    data-hf-options="{
        required: true,
        emptyContent : 'Select...' 
    }"
></div>
For each DatePicker inside your Forms there is one value pair of stored data. Date format according ISO 8601
{
    "id": "pg_date",
    "value": "2021-07-15T22:00:00.000Z"
}
{
    "id": "pg_date_HFDate",
    "value": "16. Jul. 2021"
}
{
    "id": "pg_date_HFLocal",
    "value": "2021-07-16T00:00:00.000+02:00"
}