Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Jul 2, 2024
1 parent 4c1fe70 commit 48102fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions docs/data/date-pickers/custom-components/ActionBarComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker';

import { useLocaleText } from '@mui/x-date-pickers/hooks';
import { usePickersTranslations } from '@mui/x-date-pickers/hooks';

function CustomActionBar(props) {
const { onAccept, onClear, onCancel, onSetToday, actions, className } = props;
const localeText = useLocaleText();
const translations = usePickersTranslations();
const [anchorEl, setAnchorEl] = React.useState(null);
const open = Boolean(anchorEl);
const id = useId();
Expand All @@ -34,7 +34,7 @@ function CustomActionBar(props) {
}}
key={actionType}
>
{localeText.clearButtonLabel}
{translations.clearButtonLabel}
</MenuItem>
);

Expand All @@ -47,7 +47,7 @@ function CustomActionBar(props) {
}}
key={actionType}
>
{localeText.cancelButtonLabel}
{translations.cancelButtonLabel}
</MenuItem>
);

Expand All @@ -60,7 +60,7 @@ function CustomActionBar(props) {
}}
key={actionType}
>
{localeText.okButtonLabel}
{translations.okButtonLabel}
</MenuItem>
);

Expand All @@ -74,7 +74,7 @@ function CustomActionBar(props) {
}}
key={actionType}
>
{localeText.todayButtonLabel}
{translations.todayButtonLabel}
</MenuItem>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const DateTimePickerTabs = function DateTimePickerTabs<TDate extends PickerValid
sx,
} = props;

const translations = usePickersTranslations();
const translations = usePickersTranslations<TDate>();
const classes = useUtilityClasses(props);

const handleChange = (event: React.SyntheticEvent, value: TabValue) => {
Expand Down

0 comments on commit 48102fd

Please sign in to comment.