Calendar
<gstock-calendar>
|
GstockCalendar
API
Propiedades
| Nombre | Descripción | Reflects | Tipo | Por defecto |
|---|---|---|---|---|
defaultValue
|
The default value of the form control. Primarily used for resetting the form control. |
string[]
|
[]
|
|
currentDate
show-current-date
|
Enable this option to highlight the current date. |
boolean
|
false
|
|
disabled
|
Indicate if the calendar is disabled. |
|
boolean
|
false
|
form
|
By default, form controls are associated with the nearest containing
<form> element. This attribute allows you to place the
form control outside of a form and associate it with the form that has
this id. The form must be in the same document or shadow root
for this to work.
|
|
string
|
''
|
minYear
min-year
|
Minimum year that can be navigated. |
number | undefined
|
-
|
|
maxYear
max-year
|
Maximum year that can be navigated. |
number | undefined
|
-
|
|
minDate
min-date
|
Minimum date that can be selected. |
string | undefined
|
-
|
|
maxDate
max-date
|
Maximum date that can be selected. |
string | undefined
|
-
|
|
name
|
The name of the autocomplete, submitted as a name/value pair with form data. |
string
|
''
|
|
required
|
The calendar’s required attribute. |
|
boolean
|
false
|
startDayWeek
start-day-week
|
Indicate the start day of the week (0 for Sunday - 6 for Saturday). |
number
|
1
|
|
title
|
Title to display in the calendar. |
string
|
''
|
|
validityStyles
validity-styles
|
Specify whether validation styles are applied. |
false
|
-
|
|
value
|
The current value of the dates, submitted as a name/value pair with form data. The value attribute will be a space-delimited list of values based on the dates selected, and the value property will be an array. |
string[]
|
[]
|
|
year
|
Year to display in the calendar (default is the current year). |
number
|
-
|
|
validity
|
Gets the validity state object |
-
|
-
|
|
validationMessage
|
Gets the validation message |
-
|
-
|
|
updateComplete
|
A read-only promise that resolves when the component has finished updating. |
Aprende más sobre atributos y propiedades .
Eventos
| Nombre | React Event | Descripción | Event Detail |
|---|---|---|---|
gstock-change-event
|
onGstockChangeEvent
|
Emitted when the control’s value changes. | - |
gstock-input-event
|
onGstockInputEvent
|
Emitted when the control receives input. | - |
Aprende más sobre eventos .
Métodos
| Nombre | Descripción |
|---|---|
checkValidity( )
|
Checks for validity but does not show a validation message. Returns
true when valid and false when invalid.
|
getForm( )
|
Gets the associated form, if one exists. |
reportValidity( )
|
Checks for validity and shows the browser’s validation message if the control is invalid. |
setCustomValidity(
|
Sets a custom validation message. Pass an empty string to restore validity. |
goToPreviousYear( )
|
Go to the previous year. |
goToNextYear( )
|
Go to the next year. |
Aprende más sobre métodos .
Partes
| Nombre | Descripción |
|---|---|
base
|
The component’s base wrapper. |
previous
|
The previous button. |
next
|
The next button. |
Aprende más sobre partes CSS .
Dependencias
Este componente importa automáticamente las siguientes dependencias.