File tree Expand file tree Collapse file tree 2 files changed +65
-15
lines changed
src/Shared/Components/DatePicker Expand file tree Collapse file tree 2 files changed +65
-15
lines changed Original file line number Diff line number Diff line change @@ -71,13 +71,13 @@ const DateTimePicker = ({
71
71
const isDayBlocked = ( day ) => isTodayBlocked && ! day . isAfter ( today )
72
72
73
73
return (
74
- < div >
74
+ < div className = "date-time-picker" >
75
75
< label className = { `form__label ${ required ? 'dc__required-field' : '' } ` } htmlFor = { id } >
76
76
{ label }
77
77
</ label >
78
- < div className = "dc__grid-row-one-half dc__gap-8" >
78
+ < div className = "flex left dc__gap-8" >
79
79
< SingleDatePicker
80
- id = "single_date_picker"
80
+ id = { id }
81
81
placeholder = "Select date"
82
82
date = { moment ( dateObject ) }
83
83
onDateChange = { handleDateChange }
@@ -95,6 +95,7 @@ const DateTimePicker = ({
95
95
displayFormat = { DATE_TIME_FORMATS . DD_MMM_YYYY }
96
96
data-testid = { dataTestidForDate }
97
97
isDayBlocked = { isDayBlocked }
98
+ disabled = { disabled }
98
99
/>
99
100
{ ! hideTimeSelect && (
100
101
< div className = "dc__no-shrink" >
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- .window-configuration {
17
+ .date-time-picker {
18
18
.DayPicker__horizontal {
19
19
position : fixed !important ;
20
20
}
21
-
21
+
22
22
.SingleDatePickerInput {
23
23
display : flex !important ;
24
- width : 200 px ;
24
+ width : 100 % ;
25
25
background-color : var (--N50 );
26
26
margin-right : 0 !important ;
27
27
padding : 0 !important ;
28
28
height : 36px !important ;
29
+ overflow : hidden ;
30
+ border : 1px solid var (--N200 );
31
+ border-radius : 4px ;
32
+
33
+ & :hover {
34
+ border : 1px solid var (--N400 );
35
+ }
36
+
37
+ & :focus ,
38
+ & :focus-visible ,
39
+ & :focus-within {
40
+ border : 1px solid var (--B500 );
41
+ }
42
+
43
+ & __disabled {
44
+ background-color : var (--N100 );
45
+ border-color : var (--N200 );
46
+ }
29
47
}
30
-
48
+
31
49
.SingleDatePickerInput_calendarIcon {
32
50
padding : 0 !important ;
33
51
margin : 0 !important ;
34
52
padding-right : 8px !important ;
35
- background-color : var (--N50 ) !important ;
36
- height : 36px !important ;
53
+ background-color : transparent !important ;
54
+ height : 34px !important ;
55
+ display : flex ;
56
+ align-items : center ;
57
+
58
+ & :focus-visible {
59
+ outline : none ;
60
+ }
37
61
}
38
-
39
- .SingleDatePickerInput__withBorder .DateInput {
40
- line-height : 20px !important ;
62
+
63
+ .SingleDatePickerInput__withBorder {
64
+ .DateInput {
65
+ line-height : 20px !important ;
66
+ height : 34px ;
67
+ background-color : transparent ;
68
+ width : 100% ;
69
+ }
70
+
71
+ .DateInput_input {
72
+ font-size : 13px ;
73
+ border-bottom : none ;
74
+ cursor : pointer ;
75
+ background-color : transparent ;
76
+ color : var (--N900 );
77
+
78
+ & __focused +.DateInput_fang {
79
+ display : none ;
80
+ }
81
+
82
+ & __disabled {
83
+ cursor : not-allowed ;
84
+ }
85
+ }
41
86
}
42
-
87
+
43
88
.DateInput_input {
44
- padding : 6px 8px !important
89
+ padding : 6px 8px !important ;
90
+
91
+ & __disabled {
92
+ font-style : normal ;
93
+ }
45
94
}
46
- }
95
+ }
You can’t perform that action at this time.
0 commit comments