File tree Expand file tree Collapse file tree 4 files changed +13
-41
lines changed
v4/routes/components/dateField
controls/inputs/datePicker/baseCalendarPicker/calendarActionBar
v4Adapter/overrides/cards/sharedStyles Expand file tree Collapse file tree 4 files changed +13
-41
lines changed Original file line number Diff line number Diff line change 14
14
* You should have received a copy of the GNU Affero General Public License
15
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
*/
17
- import { ComponentType , useEffect } from 'react' ;
18
- import { DatePickerProps } from '@mui/lab/DatePicker' ;
19
- import { DateTimePickerProps } from '@mui/lab/DateTimePicker' ;
17
+ import { useEffect } from 'react' ;
20
18
import { TextField } from '@mui/material' ;
21
19
import { useState } from 'react' ;
22
- import { StyledDatePicker , StyledDateTimePicker } from './dateField.styles' ;
20
+ import { DateTimePicker } from '@controls/inputs/datePicker/dateTimePicker.component' ;
21
+ import { DatePicker } from '@controls/inputs/datePicker/datePicker.component' ;
23
22
24
23
interface IProps {
25
24
value ?: any ;
@@ -48,7 +47,7 @@ export const DateField = ({
48
47
...dateFieldProps
49
48
} : IProps ) => {
50
49
const [ value , setValue ] = useState ( propValue || null ) ;
51
- const Picker : ComponentType < DatePickerProps | DateTimePickerProps > = dateTime ? StyledDateTimePicker : StyledDatePicker ;
50
+ const Picker = dateTime ? DateTimePicker : DatePicker ;
52
51
53
52
const handleAccept = ( newValue ) => {
54
53
if ( newValue ) {
@@ -78,11 +77,13 @@ export const DateField = ({
78
77
defaultValue = { defaultValue }
79
78
name = { name }
80
79
onBlur = { onBlur }
81
- className = { className }
82
80
{ ...props }
81
+ InputProps = { { endAdornment : null } }
83
82
/>
84
83
) }
84
+ className = { className }
85
85
{ ...dateFieldProps }
86
+ components = { { ActionBar : null } }
86
87
/>
87
88
) ;
88
89
} ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ type ICalendarActionBar = {
25
25
export const CalendarActionBar = ( { onClear, hidden } : ICalendarActionBar ) => {
26
26
if ( hidden ) return null ;
27
27
return (
28
- < ClearDateAction onClick = { onClear } hidden = { hidden } >
28
+ < ClearDateAction onClick = { onClear } >
29
29
< FormattedMessage id = "datePicker.actionBar.clear" defaultMessage = "Clear date" />
30
30
</ ClearDateAction >
31
31
) ;
Original file line number Diff line number Diff line change @@ -35,11 +35,14 @@ export default css`
35
35
}
36
36
${ SequenceDateContainer } {
37
37
width : 190px ;
38
- ${ SequenceDateField } {
38
+ ${ SequenceDateField } { // HERE
39
+ outline : 1px solid peru;
39
40
.MuiInputBase-root {
41
+ outline : 1px solid hotpink;
40
42
margin : 0px ;
41
-
43
+
42
44
input {
45
+ outline : 1px solid lightgoldenrodyellow;
43
46
color : ${ ( { theme } ) => theme . palette . secondary . main } ;
44
47
box-sizing : border-box;
45
48
width : 184px ;
You can’t perform that action at this time.
0 commit comments