Default – Value
This attribute enters a fixed value or script.
Set the Value according to the type selected in Default Type.
When Default Type
is set to Script, the value should be written in the form of a JavaScript function. For example, to display the current date as the Default Value for a DatePicker control, you would set Default Type
to Script and then enter the following function in the Value field:
javascript
(function(){
const dateRange = [];
const now = new Date();
dateRange.push(now, now);
return dateRange;
})()
When the Default-Type
is set to Fixed, enter the fixed value in Value field
. To display only the year in an input control like Text, you would need to input 2023
as the value in the Value field
.
[Image 1. When the Default Value is set to Script with current date
]
[Image 2. When applying Default Value - Fixed as 2023
.]