File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
src/components/Datepicker Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ button.year.active:not(.selected-ends)
28
28
background-color : var (--sgds-form-primary-bg-translucent );
29
29
border-radius : 0 ;
30
30
}
31
+
31
32
td [data-day ]: hover : not (.disabled ): not (.selected-ends ): not (.active ),
32
33
button .month : hover : not (.active ),
33
34
button .year : hover : not (.active ) {
@@ -37,8 +38,12 @@ button.year:hover:not(.active) {
37
38
td [data-day ]: focus ,
38
39
button .month : focus ,
39
40
button .year : focus {
40
- box-shadow : var (--sgds-box-shadow-focus );
41
- outline : unset;
41
+ outline : var (--sgds-form-border-radius-sm ) solid var (--sgds-blue-400 );
42
+ }
43
+ td [data-day ].active : not (.selected-ends ): focus ,
44
+ button .month .active : not (.selected-ends ): focus ,
45
+ button .year .active : not (.selected-ends ): focus {
46
+ border-radius : var (--sgds-form-border-radius-sm );
42
47
}
43
48
button .year .active {
44
49
cursor : pointer;
@@ -61,6 +66,7 @@ button.year.active.selected-ends {
61
66
background-color : var (--sgds-form-primary-bg );
62
67
color : var (--sgds-form-color-on-dark );
63
68
}
69
+
64
70
td [data-day ].disabled {
65
71
opacity : var (--sgds-opacity-50 );
66
72
cursor : not-allowed;
Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ export class DatepickerCalendar extends SgdsElement {
93
93
connectedCallback ( ) : void {
94
94
super . connectedCallback ( ) ;
95
95
this . addEventListener ( "keydown" , this . _handleKeyPress ) ;
96
+ /** Prevent validation from happening when navigating the calendar */
97
+ this . addEventListener ( "blur" , e => e . stopPropagation ( ) ) ;
96
98
}
97
99
98
100
updated ( ) {
Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ export class SgdsDatepicker extends SgdsFormValidatorMixin(DropdownElement) impl
320
320
private async _handleInvalidInput ( ) {
321
321
this . selectedDateRange = [ ] ;
322
322
this . displayDate = this . initialDisplayDate ;
323
- this . invalid = true
323
+ this . invalid = true ;
324
324
this . _manageInternalsBadInput ( ) ;
325
325
}
326
326
private async _handleEmptyInput ( ) {
You can’t perform that action at this time.
0 commit comments