Questa pagina è generata dai pacchetti Magma, documentati solo in inglese.
<mds-input-field label="Data di nascita"> <mds-input-date name="birthdate"></mds-input-date></mds-input-field><mds-input-date name="dataScadenza" value="2026-12-31"></mds-input-date><mds-input-field label="Data di inizio *"> <mds-input-date name="startDate" required></mds-input-date></mds-input-field><mds-input-date name="dataSopralluogo" min="2026-01-01" max="2026-12-31"></mds-input-date><mds-input-date id="picker" name="dataEvento"></mds-input-date>
<script> const picker = document.getElementById('picker');
picker.addEventListener('mdsInputDateSelect', (e) => { console.log('Data selezionata:', e.detail); // "2026-06-15" });
picker.addEventListener('mdsInputValidation', (e) => { console.log('Valido:', e.detail); // true | false });</script><mds-input-date id="datePicker" name="dataConsegna"></mds-input-date>
<script> document.getElementById('datePicker').setValue('2026-09-01');</script><!-- Default: closes 500 ms after pick --><mds-input-date name="dataRiunione" delay="500"></mds-input-date>
<!-- Keep open until the user dismisses manually --><mds-input-date name="dataRiunione" delay="0"></mds-input-date><!-- Disabled: no interaction at all --><mds-input-date name="dataArchiviazione" disabled value="2025-01-01"></mds-input-date>
<!-- Read-only: focusable, not editable --><mds-input-date name="dataCreazione" readonly value="2024-06-01"></mds-input-date><form action="/prenota" method="post"> <mds-input-field label="Data prenotazione"> <mds-input-date name="bookingDate" required></mds-input-date> </mds-input-field> <mds-button type="submit" label="Conferma" variant="primary" tone="strong"></mds-button></form><mds-input-date-range> <mds-input-date slot="start" name="rangeStart"></mds-input-date> <mds-input-date slot="end" name="rangeEnd"></mds-input-date></mds-input-date-range><mds-input-date id="dataConferma" name="dataConferma" value="2026-03-15"></mds-input-date>
<script> // Pre-mark as success when the date was already validated server-side const field = document.getElementById('dataConferma'); field.componentOnReady().then(() => { field.variant = 'success'; });</script>.booking-widget mds-input-date { --mds-input-date-background: rgb(var(--magma-wash-base)); --mds-input-date-icon-color: rgb(var(--magma-accent-fg)); --mds-input-date-ring: 0 0 0 2px rgb(var(--magma-border-focus) / 0.5);}