Added Statistics calculation
Statistics now show calculated values
This commit is contained in:
parent
fe87374e47
commit
fc0f69dacb
2147 changed files with 141321 additions and 39 deletions
25
node_modules/@mui/x-date-pickers/esm/internals/hooks/useClockReferenceDate.js
generated
vendored
Normal file
25
node_modules/@mui/x-date-pickers/esm/internals/hooks/useClockReferenceDate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import * as React from 'react';
|
||||
import { singleItemValueManager } from "../utils/valueManagers.js";
|
||||
import { getTodayDate } from "../utils/date-utils.js";
|
||||
import { SECTION_TYPE_GRANULARITY } from "../utils/getDefaultReferenceDate.js";
|
||||
export const useClockReferenceDate = ({
|
||||
value,
|
||||
referenceDate: referenceDateProp,
|
||||
adapter,
|
||||
props,
|
||||
timezone
|
||||
}) => {
|
||||
const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({
|
||||
value,
|
||||
adapter,
|
||||
props,
|
||||
referenceDate: referenceDateProp,
|
||||
granularity: SECTION_TYPE_GRANULARITY.day,
|
||||
timezone,
|
||||
getTodayDate: () => getTodayDate(adapter, timezone, 'date')
|
||||
}),
|
||||
// We want the `referenceDate` to update on prop and `timezone` change (https://github.com/mui/mui-x/issues/10804)
|
||||
[referenceDateProp, timezone] // eslint-disable-line react-hooks/exhaustive-deps
|
||||
);
|
||||
return value ?? referenceDate;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue