File tree Expand file tree Collapse file tree 3 files changed +25
-19
lines changed
test/unit/specs/DateInput Expand file tree Collapse file tree 3 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 2
2
<div :class =" { 'input-group': bootstrapStyling }" >
3
3
<slot name =" beforeDateInput" />
4
4
<!-- Calendar Button -->
5
- <span
5
+ <button
6
6
v-if =" calendarButton"
7
7
class =" vdp-datepicker__calendar-button"
8
- :class =" {
9
- 'input-group-prepend': bootstrapStyling,
10
- 'calendar-btn-disabled': disabled,
11
- }"
8
+ :class =" { 'btn input-group-prepend': bootstrapStyling }"
9
+ :disabled =" disabled"
10
+ type =" button"
12
11
@click =" toggle"
13
12
>
14
13
<span :class =" { 'input-group-text': bootstrapStyling }" >
19
18
</i >
20
19
</slot >
21
20
</span >
22
- </span >
21
+ </button >
23
22
<!-- Input -->
24
23
<input
25
24
:id =" id"
46
45
@keyup =" parseTypedDate"
47
46
/>
48
47
<!-- Clear Button -->
49
- <span
48
+ <button
50
49
v-if =" clearButton && selectedDate"
51
50
class =" vdp-datepicker__clear-button"
52
- :class =" { 'input-group-append': bootstrapStyling }"
53
- @click =" clearDate()"
51
+ :class =" { 'btn input-group-append': bootstrapStyling }"
52
+ :disabled =" disabled"
53
+ type =" button"
54
+ @click =" clearDate"
54
55
>
55
56
<span :class =" { 'input-group-text': bootstrapStyling }" >
56
57
<slot name =" clearBtn" >
59
60
</i >
60
61
</slot >
61
62
</span >
62
- </span >
63
+ </button >
63
64
<slot name =" afterDateInput" />
64
65
</div >
65
66
</template >
Original file line number Diff line number Diff line change 6
6
position : relative ;
7
7
text-align : left ;
8
8
box-sizing : border-box ;
9
-
10
- .calendar-btn-disabled {
11
- cursor : not-allowed ;
12
- }
13
9
}
14
10
15
11
.vdp-datepicker__calendar {
36
32
position : static ;
37
33
}
38
34
35
+ button {
36
+ background : inherit ;
37
+ text-align : center ;
38
+
39
+ & :disabled {
40
+ color : #ddd ;
41
+ }
42
+ }
43
+
39
44
header {
40
45
display : flex ;
41
46
justify-content : space-between ;
261
266
262
267
.vdp-datepicker__clear-button ,
263
268
.vdp-datepicker__calendar-button {
264
- cursor : pointer ;
269
+ border : none ;
265
270
font-style : normal ;
266
271
267
- & .disabled {
268
- color : #999 ;
269
- cursor : default ;
272
+ & .input-group-prepend ,
273
+ & .input-group-append {
274
+ padding : 0 ;
270
275
}
271
276
}
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ describe('Datepicker mount', () => {
185
185
} )
186
186
187
187
const input = wrapper . find ( 'input' )
188
- const calendarButton = wrapper . find ( 'span .vdp-datepicker__calendar-button' )
188
+ const calendarButton = wrapper . find ( '.vdp-datepicker__calendar-button' )
189
189
190
190
await input . trigger ( 'focus' )
191
191
expect ( wrapper . vm . isOpen ) . toBeTruthy ( )
You can’t perform that action at this time.
0 commit comments