Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pickers] Add referenceDate prop on TimeClock, DigitalClock and MultiSectionDigitalClock #9356

Merged
merged 11 commits into from
Jun 30, 2023
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
flaviendelangle committed Jun 20, 2023
commit be0e5a0085d5ca3446938ece314a5b7acefaa7da
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { screen, userEvent, describeConformance } from '@mui/monorepo/test/utils';
import { screen, describeConformance } from '@mui/monorepo/test/utils';
import { describeValidation } from '@mui/x-date-pickers/tests/describeValidation';
import { describeValue } from '@mui/x-date-pickers/tests/describeValue';
import { createPickerRenderer, adapterToUse, wrapPickerMount } from 'test/utils/pickers-utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { TimeStepOptions, TimeView } from '../models';
import { TimeViewWithMeridiem } from '../internals/models';
import { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';
import { singleItemValueManager } from '../internals/utils/valueManagers';
import { useClockReferenceDate } from '@mui/x-date-pickers/internals/hooks/useClockReferenceDate';
import { useClockReferenceDate } from '../internals/hooks/useClockReferenceDate';

const useUtilityClasses = (ownerState: MultiSectionDigitalClockProps<any>) => {
const { classes } = ownerState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('<MultiSectionDigitalClock />', () => {
it('should not use `referenceDate` when a value is defined', () => {
const onChange = spy();

const ControlledMultiSectionDigitalClock = (props: MultiSectionDigitalClockProps<any>) => {
function ControlledMultiSectionDigitalClock(props: MultiSectionDigitalClockProps<any>) {
LukasTy marked this conversation as resolved.
Show resolved Hide resolved
const [value, setValue] = React.useState(props.value);

return (
Expand All @@ -46,7 +46,7 @@ describe('<MultiSectionDigitalClock />', () => {
}}
/>
);
};
}

render(
<ControlledMultiSectionDigitalClock
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { screen, userEvent, describeConformance } from '@mui/monorepo/test/utils';
import { screen, describeConformance } from '@mui/monorepo/test/utils';
import { describeValidation } from '@mui/x-date-pickers/tests/describeValidation';
import { describeValue } from '@mui/x-date-pickers/tests/describeValue';
import { createPickerRenderer, adapterToUse, wrapPickerMount } from 'test/utils/pickers-utils';
Expand Down