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
Code review: Lukas
  • Loading branch information
flaviendelangle committed Jun 29, 2023
commit d4570bc39e88b40fc6118e180ec86500c573308f
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const useClockReferenceDate = <TDate, TProps extends {}>({
granularity: SECTION_TYPE_GRANULARITY.day,
timezone,
getTodayDate: () => getTodayDate(utils, timezone, 'date'),
}),
}), // We only want to compute the reference date on mount.
[], // eslint-disable-line react-hooks/exhaustive-deps
flaviendelangle marked this conversation as resolved.
Show resolved Hide resolved
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface PickerValueManager<TValue, TDate, TError> {
* @param {MuiPickersAdapter<TDate>} params.utils The adapter.
* @param {number} params.granularity The granularity of the selection possible on this component.
* @param {PickersTimezone} params.timezone The current timezone.
* @param {() => TDate} params.getTodayDate The reference date to use if not reference date is passed to the component.
* @param {() => TDate} params.getTodayDate The reference date to use if no reference date is passed to the component.
* @returns {TValue} The reference value to use for non-provided dates.
*/
getInitialReferenceValue: (params: {
Expand Down