@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
73 lines (72 loc) • 2.9 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DateProperties = exports.DateEvents = void 0;
var _DatePickerDocs = require("../../../../components/date-picker/DatePickerDocs.js");
const {
showCancelButton,
showResetButton,
showInput,
range,
skeleton,
globalStatus,
statusProps,
statusState,
status,
inputElement,
label,
labelDirection,
labelSrOnly,
labelAlignment,
suffix,
stretch,
size,
date,
startDate,
endDate,
correctInvalidDate,
'[Space](/uilib/layout/space/properties)': space,
...datePickerProperties
} = _DatePickerDocs.DatePickerProperties;
const DateProperties = exports.DateProperties = {
range: {
...range,
doc: 'Defines if the Date field should support a value of two dates (starting and ending date). ' + 'The `value` needs to be a string containing two dates, separated by a pipe character (`|`) (`01-09-2024|30-09-2024`) when this is set to `true`. ' + 'Defaults to `false`.'
},
showInput: {
...showInput,
doc: 'If the input fields with the mask should be visible. Defaults to `true`.'
},
showCancelButton: {
...showCancelButton,
doc: 'If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText="Avbryt"` Defaults to `true`. If the `range` property is `true`, then the cancel button is shown.'
},
showResetButton: {
...showResetButton,
doc: 'If set to `true`, a reset button will be shown. You can change the default text by using `resetButtonText="Tilbakestill"`. When clicked, the field resets to the initial `value` or `defaultValue`. If no initial value was provided, the field is cleared. Defaults to `true`.'
},
size: {
...size,
doc: `${size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`
},
...datePickerProperties,
onType: {
doc: 'Event handler that is called when the user types in the input field. The first parameter is a string, the second parameter is an object containing { date, start_date, end_date, is_valid, event }.',
type: 'function',
status: 'optional'
},
onBlurValidator: {
doc: 'Custom validator function that is triggered when the user leaves a field (e.g., blurring a text input or closing a dropdown). The function can be either asynchronous or synchronous. The first parameter is the value, and the second parameter returns an object containing { errorMessages, connectWithPath, validators }. Defaults to validating invalid dates, and dates against `minDate` and `maxDate`, using `dateValidator`. Can be disabled using `false`.',
type: 'function',
status: 'optional'
}
};
const {
onChange,
onBlur,
onFocus,
...datePickerEvents
} = _DatePickerDocs.DatePickerEvents;
const DateEvents = exports.DateEvents = datePickerEvents;
//# sourceMappingURL=DateDocs.js.map