Sets the control's required
state
Checks if the value matches the format and is in range of values.
const validityResult = await ix.util.getUp("<GUID>").checkValidity();
// example of `validityResult` - the entered value has wrong format
ValidationInfo {
valStatus: false,
valMessage: 'Entry does not correspond to required format. Format: dd.MM.yyyy',
valType: 'pattern'
}
Get the current value of the control or given value as JavaScript date object.
Optional
value: stringix.util.getUp("<GUID>").getDateObject("22.02.2022");
// Returns a date object:
`Tue Feb 22 2022 00:00:00 GMT+0100 (Central European Standard Time)`
Set value of the control.
Optional
settings: { Optional
triggerPlease use setValue instead!
Sets a value for the control.
The value must be either a string (in the same format the field is configured with) or an date object.
NOTE: If the value dosen't match the field's format, no value will be set.
Optional
settings: { Optional
triggerConverts a JavaScript date object to a string like 22.02.2022
.
The output depends on the field's format settings.
// convert a given date object
ix.util.getUp("<GUID>").toLocalFormat(new Date(2022, 01, 22));
// returns
'22.02.2022'
Gets the control's
required
state.