@gitlab/ui
Version:
GitLab UI Components
44 lines (40 loc) • 1.5 kB
JavaScript
import examples from './examples';
var description = "# Datepicker\n\n<!-- STORY -->\n\n## Usage\n\nDate picker allows users to choose and input a date by manually typing the date into the input field or by using a calendar-like dropdown.\n\n";
var datepicker_documentation = {
description: description,
examples: examples,
propsInfo: {
target: {
additionalInfo: 'Selector of element that triggers the datepicker. Defaults to the calendar icon. Pass `null` to trigger on input focus.'
},
container: {
additionalInfo: 'DOM node to render calendar into. Defaults to the datepicker container. Pass `null` to use Pikaday default.'
},
disableDayFn: {
additionalInfo: 'Accepts a function that accepts a date as argument and returns true if the date is disabled.'
}
},
events: [{
event: 'input',
description: 'Emitted when a new date has been selected.',
args: [{
arg: 'date',
description: 'The selected date'
}]
}, {
event: 'close',
description: 'Emitted when the datepicker is hidden.'
}, {
event: 'open',
description: 'Emitted when the datepicker becomes visible.'
}, {
event: 'draw',
description: 'Emitted when the datepicker draws a new month.'
}],
slots: [{
name: 'default',
description: '(optional) Input to display and bind the datepicker to. Defaults to `<gl-form-input />`',
scopedProps: "{ formattedDate: string }"
}]
};
export default datepicker_documentation;