@randstad-uca/design-system 1.0.42 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,6 +12,8 @@ export declare class CalendarOverlay extends LitElement {
|
|
|
12
12
|
viewDate: Date;
|
|
13
13
|
isMobile: boolean;
|
|
14
14
|
calendarWidth: number;
|
|
15
|
+
minDate: Date | null;
|
|
16
|
+
maxDate: Date | null;
|
|
15
17
|
/**
|
|
16
18
|
* El estado de la vista actual del calendario, que puede ser 'días', 'meses' o 'años'.
|
|
17
19
|
* Determina qué cuadrícula se renderiza en el overlay.
|
|
@@ -9,6 +9,8 @@ export declare class DatePickerComponent extends LitElement {
|
|
|
9
9
|
error: boolean;
|
|
10
10
|
width?: string;
|
|
11
11
|
isRenderClearButton: boolean;
|
|
12
|
+
minDate?: string;
|
|
13
|
+
maxDate?: string;
|
|
12
14
|
private isOpen;
|
|
13
15
|
private selectedDate;
|
|
14
16
|
/** La fecha que determina el mes y año actualmente visibles en el calendario. */
|
|
@@ -83,6 +85,12 @@ export declare class DatePickerComponent extends LitElement {
|
|
|
83
85
|
* Maneja la selección de fecha desde el calendario.
|
|
84
86
|
*/
|
|
85
87
|
private handleDateSelect;
|
|
88
|
+
/**
|
|
89
|
+
* Maneja el cambio de la fecha de vista en el calendario.
|
|
90
|
+
|
|
91
|
+
* @param e - Objeto de evento con la nueva fecha de vista.
|
|
92
|
+
*/
|
|
93
|
+
private handleViewDateChange;
|
|
86
94
|
/**
|
|
87
95
|
* Cierra el calendario y actualiza el valor del componente.
|
|
88
96
|
* Emite un evento 'date-selected' con el valor de la fecha seleccionada.
|
|
@@ -90,6 +98,16 @@ export declare class DatePickerComponent extends LitElement {
|
|
|
90
98
|
* @param valueSet - La fecha en formato de cadena (ej: 'dd-MM-yyyy') a establecer.
|
|
91
99
|
*/
|
|
92
100
|
private closeOverlay;
|
|
101
|
+
/**
|
|
102
|
+
* Función auxiliar para convertir una cadena de fecha YYYY-MM-DD
|
|
103
|
+
* a un objeto Date sin problemas de zona horaria.
|
|
104
|
+
|
|
105
|
+
* @param dateString - La cadena de fecha a parsear.
|
|
106
|
+
* @returns Un objeto Date o null si la cadena es inválida.
|
|
107
|
+
*/
|
|
108
|
+
private _parseDateString;
|
|
109
|
+
private _getValidDateRange;
|
|
110
|
+
private _isWithinBounds;
|
|
93
111
|
/**
|
|
94
112
|
* Renderiza el componente DatePicker, incluyendo el input, botones y el overlay del calendario.
|
|
95
113
|
*/
|
package/dist/package.json
CHANGED
|
@@ -34,6 +34,12 @@ declare const _default: {
|
|
|
34
34
|
width: {
|
|
35
35
|
control: string;
|
|
36
36
|
};
|
|
37
|
+
minDate: {
|
|
38
|
+
control: string;
|
|
39
|
+
};
|
|
40
|
+
maxDate: {
|
|
41
|
+
control: string;
|
|
42
|
+
};
|
|
37
43
|
};
|
|
38
44
|
};
|
|
39
45
|
export default _default;
|
|
@@ -43,3 +49,4 @@ export declare const WithDefaultValueAndRequired: StoryFn;
|
|
|
43
49
|
export declare const Disabled: StoryFn;
|
|
44
50
|
export declare const WithError: StoryFn;
|
|
45
51
|
export declare const WithCustomWidth: StoryFn;
|
|
52
|
+
export declare const WithDateRange: StoryFn;
|