Input date range<mds-input-date-range>Generato da @maggioli-design-system/magma@2.3.0dist/documentation.json. Incapsulamento: shadow.
Questa pagina è generata dai pacchetti Magma, documentati solo in inglese.
I componenti Magma sono web component: elementi personalizzati che scrivi come i tag HTML, con qualsiasi framework o senza. Le proprietà li configurano, gli eventi dicono cosa è successo, i metodi sono funzioni da chiamare sull'elemento e gli slot accolgono il contenuto che metti al suo interno.
Proprietà
Imposta una proprietà come attributo HTML nel markup, oppure come proprietà da JavaScript. La colonna Attributo dà il nome dell'attributo, un trattino quando coincide con la proprietà; le proprietà senza attributo, come array e funzioni, si impostano solo da JavaScript. Per spegnere un attributo booleano, rimuovilo: non scrivere mai disabled="false".accessibleNamearia-labelstring | undefinedThe accessible name of the range: each of the two fields is named after it and after the
end of the range it covers, the visible “from” and “to” labels living in this shadow root,
where no IDREF of the slotted fields could reach them.
delay
-
number500Specifies the delay in milliseconds before closing the calendar dropdown, if the value is 0 the dropdown will not close
disabled
-
boolean | undefinedfalseDisables the range, like a disabled native input: the dates cannot be changed, from the fields
or from the calendar, and are left out of the form. It disables the two slotted fields too. A
disabled <fieldset> around the component does the same.
dualCalendardual-calendarbooleanfalseEnables the linked dual-calendar range picker behavior.
endDateend-datestringSpecifies the end date of the range
hideTodayhide-todaybooleanfalseHides the highlight on today’s date in the calendar.
max
-
null | stringnullSpecifies the max date of the range, user cannot set dates after this date
min
-
null | stringnullSpecifies the min date of the range, user cannot set dates before this date
name
-
string | undefinedIs needed to reference the form data after the form is submitted
size
-
lg | md | sm | undefinedlgSpecifies the height of the field, the same as mds-button: sm 28px, md 36px, lg 48px
startDatestart-datestringSpecifies the start date of the range
Eventi
mdsInputDateRangeValueChange{ startDate: string; endDate: string; }Emitted when the selected start or end date changes.
Metodi
preselectpreselect(event: EventDate) => Promise<void>Applies the given preselection range to the input.
Slot
Gli slot accolgono il contenuto che scrivi tra i tag del componente. Il contenuto di uno slot con nome va su un figlio diretto, con il nome dello slot nell'attributo slot, ad esempio slot="calendar-preselection".calendar-preselectionAdd HTML elements or components to this slot.
endAdd HTML elements or components to this slot.
startAdd HTML elements or components to this slot.