diff --git a/docs/data/date-pickers/legacy-time-picker/TimeValidationTimePicker.js b/docs/data/date-pickers/legacy-time-picker/TimeValidationTimePicker.js index edd3b51b166f3..835eaeb574f62 100644 --- a/docs/data/date-pickers/legacy-time-picker/TimeValidationTimePicker.js +++ b/docs/data/date-pickers/legacy-time-picker/TimeValidationTimePicker.js @@ -29,7 +29,7 @@ export default function TimeValidationTimePicker() { onChange={(newValue) => { setValue(newValue); }} - shouldDisableTime={(timeValue, clockType) => { + shouldDisableClock={(timeValue, clockType) => { if (clockType === 'hours' && timeValue % 2) { return true; } diff --git a/docs/data/date-pickers/legacy-time-picker/TimeValidationTimePicker.tsx b/docs/data/date-pickers/legacy-time-picker/TimeValidationTimePicker.tsx index 4c7d8443cf7e5..105f04c10d637 100644 --- a/docs/data/date-pickers/legacy-time-picker/TimeValidationTimePicker.tsx +++ b/docs/data/date-pickers/legacy-time-picker/TimeValidationTimePicker.tsx @@ -29,7 +29,7 @@ export default function TimeValidationTimePicker() { onChange={(newValue) => { setValue(newValue); }} - shouldDisableTime={(timeValue, clockType) => { + shouldDisableClock={(timeValue, clockType) => { if (clockType === 'hours' && timeValue % 2) { return true; } diff --git a/docs/data/date-pickers/validation/TimeValidationShouldDisableTime.js b/docs/data/date-pickers/validation/TimeValidationShouldDisableTime.js index d9adf56d7a530..53dc4bf267139 100644 --- a/docs/data/date-pickers/validation/TimeValidationShouldDisableTime.js +++ b/docs/data/date-pickers/validation/TimeValidationShouldDisableTime.js @@ -6,7 +6,8 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; import { Unstable_NextTimePicker as NextTimePicker } from '@mui/x-date-pickers/NextTimePicker'; import { Unstable_NextDateTimePicker as NextDateTimePicker } from '@mui/x-date-pickers/NextDateTimePicker'; -const shouldDisableTime = (timeValue, view) => view === 'minutes' && timeValue >= 45; +const shouldDisableTime = (value, view) => + view === 'minutes' && value.minute() >= 45; const defaultValue = dayjs().set('hour', 10).set('minute', 50).startOf('minute'); diff --git a/docs/data/date-pickers/validation/TimeValidationShouldDisableTime.tsx b/docs/data/date-pickers/validation/TimeValidationShouldDisableTime.tsx index 164f7bf743485..21c84a96d4628 100644 --- a/docs/data/date-pickers/validation/TimeValidationShouldDisableTime.tsx +++ b/docs/data/date-pickers/validation/TimeValidationShouldDisableTime.tsx @@ -10,9 +10,9 @@ import { import { Unstable_NextDateTimePicker as NextDateTimePicker } from '@mui/x-date-pickers/NextDateTimePicker'; const shouldDisableTime: NextTimePickerProps['shouldDisableTime'] = ( - timeValue, + value, view, -) => view === 'minutes' && timeValue >= 45; +) => view === 'minutes' && value.minute() >= 45; const defaultValue = dayjs().set('hour', 10).set('minute', 50).startOf('minute'); diff --git a/docs/data/date-pickers/validation/validation.md b/docs/data/date-pickers/validation/validation.md index 84279285de2a5..e58aff88a99cd 100644 --- a/docs/data/date-pickers/validation/validation.md +++ b/docs/data/date-pickers/validation/validation.md @@ -161,7 +161,7 @@ The simplest way to use it is to pass today's date and only care about the hour For example to disable the afternoon in `dayjs` you can pass `dayjs().set('hour', 12).startOf('hour')`. ::: -### Disable specific times +### Disable specific time The `shouldDisableTime` prop prevents the selection of all values for which it returns `true`. @@ -169,15 +169,20 @@ This callback receives the current view and the value to be tested: ```tsx // Disables the hours between 12 AM and 3 PM. -shouldDisableTime={(timeValue, view) => - view === 'hours' && timeValue > 12 && timeValue < 15 +shouldDisableTime={(value, view) => + view === 'hours' && value.hour() > 12 && value.hour() < 15 } // Disables the last quarter of each hour. -shouldDisableTime={(timeValue, view) => view === 'minutes' && timeValue >= 45}; +shouldDisableTime={(value, view) => view === 'minutes' && value.minute() >= 45} // Disables the second half of each minute. -shouldDisableTime={(timeValue, view) => view === 'seconds' && timeValue >= 30}; +shouldDisableTime={(value, view) => view === 'seconds' && value.second() > 30} + +// Disable the hours before 10 AM every 3rd day +shouldDisableTime={(value, view) => + view === 'hours' && value.hour() < 10 && value.date() % 3 === 0 +} ``` In the example below—the last quarter of each hour is not selectable. diff --git a/docs/data/migration/migration-pickers-v5/migration-pickers-v5.md b/docs/data/migration/migration-pickers-v5/migration-pickers-v5.md index 75b9c2de1c7fe..6e202b156fe1c 100644 --- a/docs/data/migration/migration-pickers-v5/migration-pickers-v5.md +++ b/docs/data/migration/migration-pickers-v5/migration-pickers-v5.md @@ -134,6 +134,22 @@ The legacy pickers keep the keyboard view until there removal. For more information about those new pickers, take a look at the [New picker components](#new-picker-components) section ::: +### Rename `shouldDisableTime` prop + +The `shouldDisableTime` prop signature has been changed. Either rename the prop usage to `shouldDisableClock` or refactor usage. + +```diff + view === 'hours' && timeValue < 12} ++ shouldDisableClock={(timeValue, view) => view === 'hours' && timeValue < 12} + /> + + view === 'hours' && timeValue < 12} ++ shouldDisableTime={(time, view) => view === 'hours' && value.hour() < 12} + /> +``` + ## Date library and adapters ### ✅ Do not import adapter from `@date-io` diff --git a/docs/pages/x/api/date-pickers/date-time-field.json b/docs/pages/x/api/date-pickers/date-time-field.json index 5c46f1355b112..8cf80e108cffd 100644 --- a/docs/pages/x/api/date-pickers/date-time-field.json +++ b/docs/pages/x/api/date-pickers/date-time-field.json @@ -56,6 +56,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/date-time-picker.json b/docs/pages/x/api/date-pickers/date-time-picker.json index 772d68a032000..39cfb22113663 100644 --- a/docs/pages/x/api/date-pickers/date-time-picker.json +++ b/docs/pages/x/api/date-pickers/date-time-picker.json @@ -82,6 +82,11 @@ "default": "() => ..." }, "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/desktop-date-time-picker.json b/docs/pages/x/api/date-pickers/desktop-date-time-picker.json index 7ea33c90a5188..de65bd8b1400e 100644 --- a/docs/pages/x/api/date-pickers/desktop-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-date-time-picker.json @@ -78,6 +78,11 @@ "default": "() => ..." }, "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/desktop-next-date-time-picker.json b/docs/pages/x/api/date-pickers/desktop-next-date-time-picker.json index c8077dc4222dc..48dbe92b2c829 100644 --- a/docs/pages/x/api/date-pickers/desktop-next-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-next-date-time-picker.json @@ -71,6 +71,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/desktop-next-time-picker.json b/docs/pages/x/api/date-pickers/desktop-next-time-picker.json index 628397366b0d2..fef7af86e7340 100644 --- a/docs/pages/x/api/date-pickers/desktop-next-time-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-next-time-picker.json @@ -48,6 +48,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "showToolbar": { "type": { "name": "bool" }, diff --git a/docs/pages/x/api/date-pickers/desktop-time-picker.json b/docs/pages/x/api/date-pickers/desktop-time-picker.json index b1bfc0a0960d3..cf51ca9b76d45 100644 --- a/docs/pages/x/api/date-pickers/desktop-time-picker.json +++ b/docs/pages/x/api/date-pickers/desktop-time-picker.json @@ -54,6 +54,11 @@ }, "readOnly": { "type": { "name": "bool" } }, "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "showToolbar": { "type": { "name": "bool" } }, "value": { "type": { "name": "any" } }, diff --git a/docs/pages/x/api/date-pickers/mobile-date-time-picker.json b/docs/pages/x/api/date-pickers/mobile-date-time-picker.json index cced90959b4e1..bb0a4003e1c97 100644 --- a/docs/pages/x/api/date-pickers/mobile-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/mobile-date-time-picker.json @@ -78,6 +78,11 @@ "default": "() => ..." }, "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/mobile-next-date-time-picker.json b/docs/pages/x/api/date-pickers/mobile-next-date-time-picker.json index 6e86492b71a22..6df32412baddc 100644 --- a/docs/pages/x/api/date-pickers/mobile-next-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/mobile-next-date-time-picker.json @@ -71,6 +71,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/mobile-next-time-picker.json b/docs/pages/x/api/date-pickers/mobile-next-time-picker.json index 7fe77c418f444..1dcc6642dc6ec 100644 --- a/docs/pages/x/api/date-pickers/mobile-next-time-picker.json +++ b/docs/pages/x/api/date-pickers/mobile-next-time-picker.json @@ -48,6 +48,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "showToolbar": { "type": { "name": "bool" }, diff --git a/docs/pages/x/api/date-pickers/mobile-time-picker.json b/docs/pages/x/api/date-pickers/mobile-time-picker.json index c8a6f25ceab1f..77c39983a320b 100644 --- a/docs/pages/x/api/date-pickers/mobile-time-picker.json +++ b/docs/pages/x/api/date-pickers/mobile-time-picker.json @@ -54,6 +54,11 @@ }, "readOnly": { "type": { "name": "bool" } }, "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "showToolbar": { "type": { "name": "bool" } }, "value": { "type": { "name": "any" } }, diff --git a/docs/pages/x/api/date-pickers/multi-input-date-time-range-field.json b/docs/pages/x/api/date-pickers/multi-input-date-time-range-field.json index b723197d0d8c9..58041d9ef61c4 100644 --- a/docs/pages/x/api/date-pickers/multi-input-date-time-range-field.json +++ b/docs/pages/x/api/date-pickers/multi-input-date-time-range-field.json @@ -34,6 +34,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, "spacing": { diff --git a/docs/pages/x/api/date-pickers/multi-input-time-range-field.json b/docs/pages/x/api/date-pickers/multi-input-time-range-field.json index 1694c521c2eb0..6414c1ee9a29f 100644 --- a/docs/pages/x/api/date-pickers/multi-input-time-range-field.json +++ b/docs/pages/x/api/date-pickers/multi-input-time-range-field.json @@ -30,6 +30,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "spacing": { "type": { diff --git a/docs/pages/x/api/date-pickers/next-date-time-picker.json b/docs/pages/x/api/date-pickers/next-date-time-picker.json index 40cb49297fb92..72b264072d6fd 100644 --- a/docs/pages/x/api/date-pickers/next-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/next-date-time-picker.json @@ -75,6 +75,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/next-time-picker.json b/docs/pages/x/api/date-pickers/next-time-picker.json index fa78abad2eea6..08214c853100c 100644 --- a/docs/pages/x/api/date-pickers/next-time-picker.json +++ b/docs/pages/x/api/date-pickers/next-time-picker.json @@ -52,6 +52,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "showToolbar": { "type": { "name": "bool" }, diff --git a/docs/pages/x/api/date-pickers/single-input-date-time-range-field.json b/docs/pages/x/api/date-pickers/single-input-date-time-range-field.json index 5e51bf3678a20..eeddcb2cb1719 100644 --- a/docs/pages/x/api/date-pickers/single-input-date-time-range-field.json +++ b/docs/pages/x/api/date-pickers/single-input-date-time-range-field.json @@ -56,6 +56,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, "size": { "type": { "name": "enum", "description": "'medium'
| 'small'" } }, diff --git a/docs/pages/x/api/date-pickers/single-input-time-range-field.json b/docs/pages/x/api/date-pickers/single-input-time-range-field.json index efcfaa9bffa1e..5568d38633aa9 100644 --- a/docs/pages/x/api/date-pickers/single-input-time-range-field.json +++ b/docs/pages/x/api/date-pickers/single-input-time-range-field.json @@ -52,6 +52,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "size": { "type": { "name": "enum", "description": "'medium'
| 'small'" } }, "sx": { diff --git a/docs/pages/x/api/date-pickers/static-date-time-picker.json b/docs/pages/x/api/date-pickers/static-date-time-picker.json index c1c63c2f96663..c848d43954755 100644 --- a/docs/pages/x/api/date-pickers/static-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/static-date-time-picker.json @@ -79,6 +79,11 @@ "default": "() => ..." }, "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/static-next-date-time-picker.json b/docs/pages/x/api/date-pickers/static-next-date-time-picker.json index 03be9ab69888f..c16d2ec5f5cd9 100644 --- a/docs/pages/x/api/date-pickers/static-next-date-time-picker.json +++ b/docs/pages/x/api/date-pickers/static-next-date-time-picker.json @@ -55,6 +55,11 @@ "type": { "name": "func" }, "default": "() => ..." }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableDate": { "type": { "name": "func" } }, "shouldDisableMonth": { "type": { "name": "func" } }, "shouldDisableTime": { "type": { "name": "func" } }, diff --git a/docs/pages/x/api/date-pickers/static-next-time-picker.json b/docs/pages/x/api/date-pickers/static-next-time-picker.json index c21ad61d97f78..1ff9ec33008c1 100644 --- a/docs/pages/x/api/date-pickers/static-next-time-picker.json +++ b/docs/pages/x/api/date-pickers/static-next-time-picker.json @@ -32,6 +32,11 @@ "orientation": { "type": { "name": "enum", "description": "'landscape'
| 'portrait'" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "showToolbar": { "type": { "name": "bool" }, diff --git a/docs/pages/x/api/date-pickers/static-time-picker.json b/docs/pages/x/api/date-pickers/static-time-picker.json index cc0e51d450e38..ec4389300179b 100644 --- a/docs/pages/x/api/date-pickers/static-time-picker.json +++ b/docs/pages/x/api/date-pickers/static-time-picker.json @@ -55,6 +55,11 @@ }, "readOnly": { "type": { "name": "bool" } }, "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "showToolbar": { "type": { "name": "bool" } }, "sx": { diff --git a/docs/pages/x/api/date-pickers/time-clock.json b/docs/pages/x/api/date-pickers/time-clock.json index 1fa7daaeb720e..82fca9578ecf1 100644 --- a/docs/pages/x/api/date-pickers/time-clock.json +++ b/docs/pages/x/api/date-pickers/time-clock.json @@ -24,6 +24,11 @@ "default": "'hours'" }, "readOnly": { "type": { "name": "bool" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "sx": { "type": { diff --git a/docs/pages/x/api/date-pickers/time-field.json b/docs/pages/x/api/date-pickers/time-field.json index b711331c70915..834344dc8ed4d 100644 --- a/docs/pages/x/api/date-pickers/time-field.json +++ b/docs/pages/x/api/date-pickers/time-field.json @@ -52,6 +52,11 @@ "description": "'all'
| 'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'
| number
| { endIndex: number, startIndex: number }" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "size": { "type": { "name": "enum", "description": "'medium'
| 'small'" } }, "sx": { diff --git a/docs/pages/x/api/date-pickers/time-picker.json b/docs/pages/x/api/date-pickers/time-picker.json index c2b1d62868d3d..bcf41a7a30ceb 100644 --- a/docs/pages/x/api/date-pickers/time-picker.json +++ b/docs/pages/x/api/date-pickers/time-picker.json @@ -58,6 +58,11 @@ }, "readOnly": { "type": { "name": "bool" } }, "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableClock": { + "type": { "name": "func" }, + "deprecated": true, + "deprecationInfo": "Consider using shouldDisableTime." + }, "shouldDisableTime": { "type": { "name": "func" } }, "showToolbar": { "type": { "name": "bool" } }, "value": { "type": { "name": "any" } }, diff --git a/docs/translations/api-docs/date-pickers/date-time-field-pt.json b/docs/translations/api-docs/date-pickers/date-time-field-pt.json index 365690f8f960f..c13728efe9d6d 100644 --- a/docs/translations/api-docs/date-pickers/date-time-field-pt.json +++ b/docs/translations/api-docs/date-pickers/date-time-field-pt.json @@ -38,9 +38,10 @@ "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "required": "If true, the label is displayed as required and the input element is required.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "size": "The size of the component.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", diff --git a/docs/translations/api-docs/date-pickers/date-time-field-zh.json b/docs/translations/api-docs/date-pickers/date-time-field-zh.json index 365690f8f960f..c13728efe9d6d 100644 --- a/docs/translations/api-docs/date-pickers/date-time-field-zh.json +++ b/docs/translations/api-docs/date-pickers/date-time-field-zh.json @@ -38,9 +38,10 @@ "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "required": "If true, the label is displayed as required and the input element is required.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "size": "The size of the component.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", diff --git a/docs/translations/api-docs/date-pickers/date-time-field.json b/docs/translations/api-docs/date-pickers/date-time-field.json index b20c161f060f4..ad2d76ecc5529 100644 --- a/docs/translations/api-docs/date-pickers/date-time-field.json +++ b/docs/translations/api-docs/date-pickers/date-time-field.json @@ -38,9 +38,10 @@ "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "required": "If true, the label is displayed as required and the input element is required.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "size": "The size of the component.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", diff --git a/docs/translations/api-docs/date-pickers/date-time-picker-pt.json b/docs/translations/api-docs/date-pickers/date-time-picker-pt.json index 0c1621b36f935..bd7192a06493d 100644 --- a/docs/translations/api-docs/date-pickers/date-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/date-time-picker-pt.json @@ -52,9 +52,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/date-time-picker-zh.json b/docs/translations/api-docs/date-pickers/date-time-picker-zh.json index 0c1621b36f935..bd7192a06493d 100644 --- a/docs/translations/api-docs/date-pickers/date-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/date-time-picker-zh.json @@ -52,9 +52,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/date-time-picker.json b/docs/translations/api-docs/date-pickers/date-time-picker.json index 4ba74e63b633c..4fdc7bfe84fb1 100644 --- a/docs/translations/api-docs/date-pickers/date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/date-time-picker.json @@ -52,9 +52,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-picker-pt.json b/docs/translations/api-docs/date-pickers/desktop-date-time-picker-pt.json index 973ac6a8b346e..ad1de3832e442 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-picker-pt.json @@ -51,9 +51,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-picker-zh.json b/docs/translations/api-docs/date-pickers/desktop-date-time-picker-zh.json index 973ac6a8b346e..ad1de3832e442 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-picker-zh.json @@ -51,9 +51,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-time-picker.json index a1e5867255336..19d0b6da0b0b8 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-picker.json @@ -51,9 +51,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker-pt.json b/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker-pt.json index 88d06abbaba86..47bec898fd4a5 100644 --- a/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker-pt.json @@ -46,9 +46,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker-zh.json b/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker-zh.json index 88d06abbaba86..47bec898fd4a5 100644 --- a/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker-zh.json @@ -46,9 +46,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker.json index 0d4b0794d0326..17c45503b56e7 100644 --- a/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-next-date-time-picker.json @@ -46,9 +46,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/desktop-next-time-picker-pt.json b/docs/translations/api-docs/date-pickers/desktop-next-time-picker-pt.json index 89696e4c6095e..57aeecb574bfd 100644 --- a/docs/translations/api-docs/date-pickers/desktop-next-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/desktop-next-time-picker-pt.json @@ -32,7 +32,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/desktop-next-time-picker-zh.json b/docs/translations/api-docs/date-pickers/desktop-next-time-picker-zh.json index 89696e4c6095e..57aeecb574bfd 100644 --- a/docs/translations/api-docs/date-pickers/desktop-next-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/desktop-next-time-picker-zh.json @@ -32,7 +32,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/desktop-next-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-next-time-picker.json index da404cc98376e..7a4a4bc507ad8 100644 --- a/docs/translations/api-docs/date-pickers/desktop-next-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-next-time-picker.json @@ -32,7 +32,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/desktop-time-picker-pt.json b/docs/translations/api-docs/date-pickers/desktop-time-picker-pt.json index f313cb7ab1719..d7622fc7187eb 100644 --- a/docs/translations/api-docs/date-pickers/desktop-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/desktop-time-picker-pt.json @@ -36,7 +36,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/docs/translations/api-docs/date-pickers/desktop-time-picker-zh.json b/docs/translations/api-docs/date-pickers/desktop-time-picker-zh.json index f313cb7ab1719..d7622fc7187eb 100644 --- a/docs/translations/api-docs/date-pickers/desktop-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/desktop-time-picker-zh.json @@ -36,7 +36,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/docs/translations/api-docs/date-pickers/desktop-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-time-picker.json index 3eb3bb739f5bf..07f81c84f79f8 100644 --- a/docs/translations/api-docs/date-pickers/desktop-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-time-picker.json @@ -36,7 +36,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-picker-pt.json b/docs/translations/api-docs/date-pickers/mobile-date-time-picker-pt.json index 893717ac61fb3..fafe8127499d2 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-picker-pt.json @@ -51,9 +51,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-picker-zh.json b/docs/translations/api-docs/date-pickers/mobile-date-time-picker-zh.json index 893717ac61fb3..fafe8127499d2 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-picker-zh.json @@ -51,9 +51,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-time-picker.json index 4ea73a5faf6a0..a0d6b1bf795db 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-picker.json @@ -51,9 +51,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker-pt.json b/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker-pt.json index 5c879fef40ecb..6e386583a123e 100644 --- a/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker-pt.json @@ -46,9 +46,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker-zh.json b/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker-zh.json index 5c879fef40ecb..6e386583a123e 100644 --- a/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker-zh.json @@ -46,9 +46,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker.json index 410a6c505e7c1..377a1c247b6ec 100644 --- a/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-next-date-time-picker.json @@ -46,9 +46,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/mobile-next-time-picker-pt.json b/docs/translations/api-docs/date-pickers/mobile-next-time-picker-pt.json index cf543d46ab2b3..9037d0533609f 100644 --- a/docs/translations/api-docs/date-pickers/mobile-next-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/mobile-next-time-picker-pt.json @@ -32,7 +32,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/mobile-next-time-picker-zh.json b/docs/translations/api-docs/date-pickers/mobile-next-time-picker-zh.json index cf543d46ab2b3..9037d0533609f 100644 --- a/docs/translations/api-docs/date-pickers/mobile-next-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/mobile-next-time-picker-zh.json @@ -32,7 +32,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/mobile-next-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-next-time-picker.json index 93e99f9b9d5cf..48a7fe98d9bac 100644 --- a/docs/translations/api-docs/date-pickers/mobile-next-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-next-time-picker.json @@ -32,7 +32,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/mobile-time-picker-pt.json b/docs/translations/api-docs/date-pickers/mobile-time-picker-pt.json index 34d4f4c3e7b51..4ee21e2098136 100644 --- a/docs/translations/api-docs/date-pickers/mobile-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/mobile-time-picker-pt.json @@ -36,7 +36,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/docs/translations/api-docs/date-pickers/mobile-time-picker-zh.json b/docs/translations/api-docs/date-pickers/mobile-time-picker-zh.json index 34d4f4c3e7b51..4ee21e2098136 100644 --- a/docs/translations/api-docs/date-pickers/mobile-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/mobile-time-picker-zh.json @@ -36,7 +36,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/docs/translations/api-docs/date-pickers/mobile-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-time-picker.json index 596eb36c4db80..1aa0c2ffb1d60 100644 --- a/docs/translations/api-docs/date-pickers/mobile-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-time-picker.json @@ -36,7 +36,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field-pt.json b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field-pt.json index 948cee2f652bb..51cd5faa0e4e6 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field-pt.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field-pt.json @@ -24,8 +24,9 @@ "onSelectedSectionsChange": "Callback fired when the selected sections change.

Signature:
function(newValue: FieldSelectedSections) => void
newValue: The new selected sections.", "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date. @DateIOType

Signature:
function(day: TDate, position: string) => boolean
day: The date to test.
position: The date to test, 'start' or 'end'.
returns (boolean): Returns true if the date should be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "spacing": "Defines the space between immediate children.", "sx": "The system prop, which allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled." diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field-zh.json b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field-zh.json index 948cee2f652bb..51cd5faa0e4e6 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field-zh.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field-zh.json @@ -24,8 +24,9 @@ "onSelectedSectionsChange": "Callback fired when the selected sections change.

Signature:
function(newValue: FieldSelectedSections) => void
newValue: The new selected sections.", "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date. @DateIOType

Signature:
function(day: TDate, position: string) => boolean
day: The date to test.
position: The date to test, 'start' or 'end'.
returns (boolean): Returns true if the date should be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "spacing": "Defines the space between immediate children.", "sx": "The system prop, which allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled." diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field.json index ed618724bc5e3..93a448823ae9a 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field.json @@ -24,8 +24,9 @@ "onSelectedSectionsChange": "Callback fired when the selected sections change.

Signature:
function(newValue: FieldSelectedSections) => void
newValue: The new selected sections.", "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date. @DateIOType

Signature:
function(day: TDate, position: string) => boolean
day: The date to test.
position: The date to test, 'start' or 'end'.
returns (boolean): Returns true if the date should be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "spacing": "Defines the space between immediate children.", "sx": "The system prop, which allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled." diff --git a/docs/translations/api-docs/date-pickers/multi-input-time-range-field-pt.json b/docs/translations/api-docs/date-pickers/multi-input-time-range-field-pt.json index 819a6a930a109..7532cfa90171b 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-time-range-field-pt.json +++ b/docs/translations/api-docs/date-pickers/multi-input-time-range-field-pt.json @@ -20,7 +20,8 @@ "onSelectedSectionsChange": "Callback fired when the selected sections change.

Signature:
function(newValue: FieldSelectedSections) => void
newValue: The new selected sections.", "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "spacing": "Defines the space between immediate children.", "sx": "The system prop, which allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled." diff --git a/docs/translations/api-docs/date-pickers/multi-input-time-range-field-zh.json b/docs/translations/api-docs/date-pickers/multi-input-time-range-field-zh.json index 819a6a930a109..7532cfa90171b 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-time-range-field-zh.json +++ b/docs/translations/api-docs/date-pickers/multi-input-time-range-field-zh.json @@ -20,7 +20,8 @@ "onSelectedSectionsChange": "Callback fired when the selected sections change.

Signature:
function(newValue: FieldSelectedSections) => void
newValue: The new selected sections.", "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "spacing": "Defines the space between immediate children.", "sx": "The system prop, which allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled." diff --git a/docs/translations/api-docs/date-pickers/multi-input-time-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-time-range-field.json index ea87c40cbb88b..71c3899059a57 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-time-range-field.json @@ -20,7 +20,8 @@ "onSelectedSectionsChange": "Callback fired when the selected sections change.

Signature:
function(newValue: FieldSelectedSections) => void
newValue: The new selected sections.", "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "spacing": "Defines the space between immediate children.", "sx": "The system prop, which allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled." diff --git a/docs/translations/api-docs/date-pickers/next-date-time-picker-pt.json b/docs/translations/api-docs/date-pickers/next-date-time-picker-pt.json index 6858ced5102e5..8a3e6c1feded4 100644 --- a/docs/translations/api-docs/date-pickers/next-date-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/next-date-time-picker-pt.json @@ -47,9 +47,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/next-date-time-picker-zh.json b/docs/translations/api-docs/date-pickers/next-date-time-picker-zh.json index 6858ced5102e5..8a3e6c1feded4 100644 --- a/docs/translations/api-docs/date-pickers/next-date-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/next-date-time-picker-zh.json @@ -47,9 +47,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/next-date-time-picker.json b/docs/translations/api-docs/date-pickers/next-date-time-picker.json index 1173d5b1c6bd2..73f6a027a38b8 100644 --- a/docs/translations/api-docs/date-pickers/next-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/next-date-time-picker.json @@ -47,9 +47,10 @@ "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/next-time-picker-pt.json b/docs/translations/api-docs/date-pickers/next-time-picker-pt.json index 4b46b478f78e9..2e82094a25041 100644 --- a/docs/translations/api-docs/date-pickers/next-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/next-time-picker-pt.json @@ -33,7 +33,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/next-time-picker-zh.json b/docs/translations/api-docs/date-pickers/next-time-picker-zh.json index 4b46b478f78e9..2e82094a25041 100644 --- a/docs/translations/api-docs/date-pickers/next-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/next-time-picker-zh.json @@ -33,7 +33,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/next-time-picker.json b/docs/translations/api-docs/date-pickers/next-time-picker.json index 99862fdf5221f..bdd580ed12da7 100644 --- a/docs/translations/api-docs/date-pickers/next-time-picker.json +++ b/docs/translations/api-docs/date-pickers/next-time-picker.json @@ -33,7 +33,8 @@ "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/single-input-date-time-range-field.json b/docs/translations/api-docs/date-pickers/single-input-date-time-range-field.json index a3be29d9167c6..ead5e633c481d 100644 --- a/docs/translations/api-docs/date-pickers/single-input-date-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-date-time-range-field.json @@ -38,8 +38,9 @@ "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "required": "If true, the label is displayed as required and the input element is required.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date. @DateIOType

Signature:
function(day: TDate, position: string) => boolean
day: The date to test.
position: The date to test, 'start' or 'end'.
returns (boolean): Returns true if the date should be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "size": "The size of the component.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/single-input-time-range-field.json b/docs/translations/api-docs/date-pickers/single-input-time-range-field.json index 286f25532d336..b3aceca00c915 100644 --- a/docs/translations/api-docs/date-pickers/single-input-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-time-range-field.json @@ -34,7 +34,8 @@ "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "required": "If true, the label is displayed as required and the input element is required.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "size": "The size of the component.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/static-date-time-picker-pt.json b/docs/translations/api-docs/date-pickers/static-date-time-picker-pt.json index 663a59f5d33ca..88e4101f70945 100644 --- a/docs/translations/api-docs/date-pickers/static-date-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/static-date-time-picker-pt.json @@ -49,9 +49,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/static-date-time-picker-zh.json b/docs/translations/api-docs/date-pickers/static-date-time-picker-zh.json index 663a59f5d33ca..88e4101f70945 100644 --- a/docs/translations/api-docs/date-pickers/static-date-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/static-date-time-picker-zh.json @@ -49,9 +49,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/static-date-time-picker.json b/docs/translations/api-docs/date-pickers/static-date-time-picker.json index 33f8dbb57a65e..48c758a476b08 100644 --- a/docs/translations/api-docs/date-pickers/static-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-time-picker.json @@ -49,9 +49,10 @@ "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, show the toolbar even in desktop mode.", diff --git a/docs/translations/api-docs/date-pickers/static-next-date-time-picker-pt.json b/docs/translations/api-docs/date-pickers/static-next-date-time-picker-pt.json index 64b6b6008bc1d..8d8a23b3c89b0 100644 --- a/docs/translations/api-docs/date-pickers/static-next-date-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/static-next-date-time-picker-pt.json @@ -37,9 +37,10 @@ "orientation": "Force rendering in particular orientation.", "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/static-next-date-time-picker-zh.json b/docs/translations/api-docs/date-pickers/static-next-date-time-picker-zh.json index 64b6b6008bc1d..8d8a23b3c89b0 100644 --- a/docs/translations/api-docs/date-pickers/static-next-date-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/static-next-date-time-picker-zh.json @@ -37,9 +37,10 @@ "orientation": "Force rendering in particular orientation.", "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/static-next-date-time-picker.json b/docs/translations/api-docs/date-pickers/static-next-date-time-picker.json index 1d7c22c2d8d69..68f4578a49520 100644 --- a/docs/translations/api-docs/date-pickers/static-next-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-next-date-time-picker.json @@ -37,9 +37,10 @@ "orientation": "Force rendering in particular orientation.", "reduceAnimations": "Disable heavy animations.", "renderLoading": "Component displaying when passed loading true.

Signature:
function() => React.ReactNode

returns (React.ReactNode): The node to render when loading.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableDate": "Disable specific date.

Signature:
function(day: TDate) => boolean
day: The date to test.
returns (boolean): If true the date will be disabled.", "shouldDisableMonth": "Disable specific month.

Signature:
function(month: TDate) => boolean
month: The month to test.
returns (boolean): If true, the month will be disabled.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "shouldDisableYear": "Disable specific year.

Signature:
function(year: TDate) => boolean
year: The year to test.
returns (boolean): If true, the year will be disabled.", "showDaysOutsideCurrentMonth": "If true, days that have outsideCurrentMonth={true} are displayed.", "showToolbar": "If true, the toolbar will be visible.", diff --git a/docs/translations/api-docs/date-pickers/static-next-time-picker-pt.json b/docs/translations/api-docs/date-pickers/static-next-time-picker-pt.json index b0419daac6f0f..cc0867093feda 100644 --- a/docs/translations/api-docs/date-pickers/static-next-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/static-next-time-picker-pt.json @@ -23,7 +23,8 @@ "onViewChange": "Callback fired on view change.

Signature:
function(view: TView) => void
view: The new view.", "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/static-next-time-picker-zh.json b/docs/translations/api-docs/date-pickers/static-next-time-picker-zh.json index b0419daac6f0f..cc0867093feda 100644 --- a/docs/translations/api-docs/date-pickers/static-next-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/static-next-time-picker-zh.json @@ -23,7 +23,8 @@ "onViewChange": "Callback fired on view change.

Signature:
function(view: TView) => void
view: The new view.", "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/static-next-time-picker.json b/docs/translations/api-docs/date-pickers/static-next-time-picker.json index 5c70db7005d3c..6da70ab2c365c 100644 --- a/docs/translations/api-docs/date-pickers/static-next-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-next-time-picker.json @@ -23,7 +23,8 @@ "onViewChange": "Callback fired on view change.

Signature:
function(view: TView) => void
view: The new view.", "openTo": "The default visible view. Used when the component view is not controlled. Must be a valid option from views list.", "orientation": "Force rendering in particular orientation.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, the toolbar will be visible.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/static-time-picker-pt.json b/docs/translations/api-docs/date-pickers/static-time-picker-pt.json index 2ac47d89635eb..a45b6a973ebe9 100644 --- a/docs/translations/api-docs/date-pickers/static-time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/static-time-picker-pt.json @@ -34,7 +34,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The value of the picker.", diff --git a/docs/translations/api-docs/date-pickers/static-time-picker-zh.json b/docs/translations/api-docs/date-pickers/static-time-picker-zh.json index 2ac47d89635eb..a45b6a973ebe9 100644 --- a/docs/translations/api-docs/date-pickers/static-time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/static-time-picker-zh.json @@ -34,7 +34,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The value of the picker.", diff --git a/docs/translations/api-docs/date-pickers/static-time-picker.json b/docs/translations/api-docs/date-pickers/static-time-picker.json index b28d75edf63b3..0593666e6da2f 100644 --- a/docs/translations/api-docs/date-pickers/static-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-time-picker.json @@ -34,7 +34,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The value of the picker.", diff --git a/docs/translations/api-docs/date-pickers/time-clock-pt.json b/docs/translations/api-docs/date-pickers/time-clock-pt.json index 9bf04773f19b1..80a555d7b1d80 100644 --- a/docs/translations/api-docs/date-pickers/time-clock-pt.json +++ b/docs/translations/api-docs/date-pickers/time-clock-pt.json @@ -19,7 +19,8 @@ "onViewChange": "Callback fired on view change.

Signature:
function(view: TimeView) => void
view: The new view.", "openTo": "Initially open view.", "readOnly": "Make picker read only.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", "view": "Controlled open view.", diff --git a/docs/translations/api-docs/date-pickers/time-clock-zh.json b/docs/translations/api-docs/date-pickers/time-clock-zh.json index 9bf04773f19b1..80a555d7b1d80 100644 --- a/docs/translations/api-docs/date-pickers/time-clock-zh.json +++ b/docs/translations/api-docs/date-pickers/time-clock-zh.json @@ -19,7 +19,8 @@ "onViewChange": "Callback fired on view change.

Signature:
function(view: TimeView) => void
view: The new view.", "openTo": "Initially open view.", "readOnly": "Make picker read only.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", "view": "Controlled open view.", diff --git a/docs/translations/api-docs/date-pickers/time-clock.json b/docs/translations/api-docs/date-pickers/time-clock.json index 37970cc3c35f5..4e4f0f59b8b4f 100644 --- a/docs/translations/api-docs/date-pickers/time-clock.json +++ b/docs/translations/api-docs/date-pickers/time-clock.json @@ -19,7 +19,8 @@ "onViewChange": "Callback fired on view change.

Signature:
function(view: TimeView) => void
view: The new view.", "openTo": "Initially open view.", "readOnly": "Make picker read only.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", "view": "Controlled open view.", diff --git a/docs/translations/api-docs/date-pickers/time-field-pt.json b/docs/translations/api-docs/date-pickers/time-field-pt.json index 622341fb65829..322a2047b3d6c 100644 --- a/docs/translations/api-docs/date-pickers/time-field-pt.json +++ b/docs/translations/api-docs/date-pickers/time-field-pt.json @@ -34,7 +34,8 @@ "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "required": "If true, the label is displayed as required and the input element is required.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "size": "The size of the component.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/time-field-zh.json b/docs/translations/api-docs/date-pickers/time-field-zh.json index 622341fb65829..322a2047b3d6c 100644 --- a/docs/translations/api-docs/date-pickers/time-field-zh.json +++ b/docs/translations/api-docs/date-pickers/time-field-zh.json @@ -34,7 +34,8 @@ "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "required": "If true, the label is displayed as required and the input element is required.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "size": "The size of the component.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/time-field.json b/docs/translations/api-docs/date-pickers/time-field.json index 87e895730560c..0806fbf95b4ef 100644 --- a/docs/translations/api-docs/date-pickers/time-field.json +++ b/docs/translations/api-docs/date-pickers/time-field.json @@ -34,7 +34,8 @@ "readOnly": "It prevents the user from changing the value of the field (not from interacting with the field).", "required": "If true, the label is displayed as required and the input element is required.", "selectedSections": "The currently selected sections. This prop accept four formats: 1. If a number is provided, the section at this index will be selected. 2. If an object with a startIndex and endIndex properties are provided, the sections between those two indexes will be selected. 3. If a string of type MuiDateSectionName is provided, the first section with that name will be selected. 4. If null is provided, no section will be selected If not provided, the selected sections will be handled internally.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "size": "The size of the component.", "sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.", "value": "The selected value. Used when the component is controlled.", diff --git a/docs/translations/api-docs/date-pickers/time-picker-pt.json b/docs/translations/api-docs/date-pickers/time-picker-pt.json index 7c42b6ad9d11c..0a8ecd3b38e08 100644 --- a/docs/translations/api-docs/date-pickers/time-picker-pt.json +++ b/docs/translations/api-docs/date-pickers/time-picker-pt.json @@ -37,7 +37,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/docs/translations/api-docs/date-pickers/time-picker-zh.json b/docs/translations/api-docs/date-pickers/time-picker-zh.json index 7c42b6ad9d11c..0a8ecd3b38e08 100644 --- a/docs/translations/api-docs/date-pickers/time-picker-zh.json +++ b/docs/translations/api-docs/date-pickers/time-picker-zh.json @@ -37,7 +37,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/docs/translations/api-docs/date-pickers/time-picker.json b/docs/translations/api-docs/date-pickers/time-picker.json index a21c7a52fdc49..5558606027943 100644 --- a/docs/translations/api-docs/date-pickers/time-picker.json +++ b/docs/translations/api-docs/date-pickers/time-picker.json @@ -37,7 +37,8 @@ "readOnly": "Make picker read only.", "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.

Signature:
function(props: MuiTextFieldPropsType) => React.ReactNode
props: The props of the input.
returns (React.ReactNode): The node to render as the input.", "rifmFormatter": "Custom formatter to be passed into Rifm component.

Signature:
function(str: string) => string
str: The un-formatted string.
returns (string): The formatted string.", - "shouldDisableTime": "Disable specific time.

Signature:
function(timeValue: number, view: TimeView) => boolean
timeValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableClock": "Disable specific clock time.

Signature:
function(clockValue: number, view: TimeView) => boolean
clockValue: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", + "shouldDisableTime": "Disable specific time.

Signature:
function(value: TDate, view: TimeView) => boolean
value: The value to check.
view: The clock type of the timeValue.
returns (boolean): If true the time will be disabled.", "showToolbar": "If true, show the toolbar even in desktop mode.", "value": "The value of the picker.", "views": "Array of views to show." diff --git a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx index 167f8cff59403..576d72a2838c4 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx @@ -60,6 +60,7 @@ const MultiInputDateTimeRangeField = React.forwardRef(function MultiInputDateTim minDateTime, maxDateTime, minutesStep, + shouldDisableClock, shouldDisableTime, disableFuture, disablePast, @@ -132,6 +133,7 @@ const MultiInputDateTimeRangeField = React.forwardRef(function MultiInputDateTim minDateTime, maxDateTime, minutesStep, + shouldDisableClock, shouldDisableTime, disableFuture, disablePast, @@ -307,6 +309,14 @@ MultiInputDateTimeRangeField.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. @DateIOType * @template TDate @@ -317,7 +327,7 @@ MultiInputDateTimeRangeField.propTypes = { shouldDisableDate: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx index ca10d1ebebb84..b1cb4ff5349e7 100644 --- a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx @@ -55,6 +55,7 @@ const MultiInputTimeRangeField = React.forwardRef(function MultiInputTimeRangeFi minTime, maxTime, minutesStep, + shouldDisableClock, shouldDisableTime, disableFuture, disablePast, @@ -123,6 +124,7 @@ const MultiInputTimeRangeField = React.forwardRef(function MultiInputTimeRangeFi minTime, maxTime, minutesStep, + shouldDisableClock, shouldDisableTime, disableFuture, disablePast, @@ -282,9 +284,17 @@ MultiInputTimeRangeField.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx index 26f3cc19bf773..24199a022d122 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx @@ -258,6 +258,14 @@ SingleInputDateTimeRangeField.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. @DateIOType * @template TDate @@ -268,7 +276,7 @@ SingleInputDateTimeRangeField.propTypes = { shouldDisableDate: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx index fd7da98d01055..0fb48c01e6340 100644 --- a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx @@ -243,9 +243,17 @@ SingleInputTimeRangeField.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx index cbb1b9e32a830..1ec8f544e5637 100644 --- a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx +++ b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx @@ -261,6 +261,14 @@ DateTimeField.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -277,7 +285,7 @@ DateTimeField.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/DateTimeField/useDateTimeField.ts b/packages/x-date-pickers/src/DateTimeField/useDateTimeField.ts index a578e33fa4476..b6be8b312341f 100644 --- a/packages/x-date-pickers/src/DateTimeField/useDateTimeField.ts +++ b/packages/x-date-pickers/src/DateTimeField/useDateTimeField.ts @@ -60,6 +60,7 @@ export const useDateTimeField = ({ maxDateTime, minutesStep, disableIgnoringDatePartForTimeValidation, + shouldDisableClock, shouldDisableTime, selectedSections, onSelectedSectionsChange, @@ -87,6 +88,7 @@ export const useDateTimeField = ({ minTime, maxTime, minutesStep, + shouldDisableClock, shouldDisableTime, disableIgnoringDatePartForTimeValidation, selectedSections, diff --git a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx index 00471cf9d5e1a..31b75eeb4e555 100644 --- a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx +++ b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx @@ -361,6 +361,14 @@ DateTimePicker.propTypes = { * @returns {string} The formatted string. */ rifmFormatter: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -377,7 +385,7 @@ DateTimePicker.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx index 381575554c655..d11dbe2ea267a 100644 --- a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx @@ -386,6 +386,14 @@ DesktopDateTimePicker.propTypes = { * @returns {string} The formatted string. */ rifmFormatter: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -402,7 +410,7 @@ DesktopDateTimePicker.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/DesktopNextDateTimePicker/DesktopNextDateTimePicker.tsx b/packages/x-date-pickers/src/DesktopNextDateTimePicker/DesktopNextDateTimePicker.tsx index 1729fa77bffd3..773218166c34a 100644 --- a/packages/x-date-pickers/src/DesktopNextDateTimePicker/DesktopNextDateTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopNextDateTimePicker/DesktopNextDateTimePicker.tsx @@ -330,6 +330,14 @@ DesktopNextDateTimePicker.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -346,7 +354,7 @@ DesktopNextDateTimePicker.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/DesktopNextTimePicker/DesktopNextTimePicker.tsx b/packages/x-date-pickers/src/DesktopNextTimePicker/DesktopNextTimePicker.tsx index f62e0cc2bc723..d4c3d5a9d9d86 100644 --- a/packages/x-date-pickers/src/DesktopNextTimePicker/DesktopNextTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopNextTimePicker/DesktopNextTimePicker.tsx @@ -254,9 +254,17 @@ DesktopNextTimePicker.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.test.tsx b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.test.tsx index c365a043fdf4c..93b995baaf9a8 100644 --- a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.test.tsx +++ b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.test.tsx @@ -213,7 +213,12 @@ describe('', () => { }), ); - const shouldDisableTime: TimePickerProps['shouldDisableTime'] = (value) => value === 10; + const shouldDisableClock: TimePickerProps['shouldDisableClock'] = (value) => value === 10; + const shouldDisableTime: TimePickerProps['shouldDisableTime'] = (value, view) => { + const comparingValue = + view === 'hours' ? adapterToUse.getHours(value) : adapterToUse.getMinutes(value); + return comparingValue === 10; + }; [ { expectedError: 'invalidDate', props: { disableMaskedInput: true }, input: 'invalidText' }, @@ -227,6 +232,12 @@ describe('', () => { props: { maxTime: adapterToUse.date(new Date(2000, 0, 1, 8)) }, input: '12:00', }, + { expectedError: 'shouldDisableClock-hours', props: { shouldDisableClock }, input: '10:00' }, + { + expectedError: 'shouldDisableClock-minutes', + props: { shouldDisableClock }, + input: '00:10', + }, { expectedError: 'shouldDisableTime-hours', props: { shouldDisableTime }, input: '10:00' }, { expectedError: 'shouldDisableTime-minutes', props: { shouldDisableTime }, input: '00:10' }, { expectedError: 'disableFuture', props: { disableFuture: true }, input: '10:06' }, diff --git a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx index 170bba8735262..3789cd4fc52c9 100644 --- a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx @@ -304,9 +304,17 @@ DesktopTimePicker.propTypes = { * @returns {string} The formatted string. */ rifmFormatter: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx index 55cfedb281bf6..d2a43b6e68bae 100644 --- a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx @@ -387,6 +387,14 @@ MobileDateTimePicker.propTypes = { * @returns {string} The formatted string. */ rifmFormatter: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -403,7 +411,7 @@ MobileDateTimePicker.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/MobileNextDateTimePicker/MobileNextDateTimePicker.tsx b/packages/x-date-pickers/src/MobileNextDateTimePicker/MobileNextDateTimePicker.tsx index 88d5a4dc51cf3..b640306ee5b04 100644 --- a/packages/x-date-pickers/src/MobileNextDateTimePicker/MobileNextDateTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileNextDateTimePicker/MobileNextDateTimePicker.tsx @@ -333,6 +333,14 @@ MobileNextDateTimePicker.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -349,7 +357,7 @@ MobileNextDateTimePicker.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/MobileNextTimePicker/MobileNextTimePicker.tsx b/packages/x-date-pickers/src/MobileNextTimePicker/MobileNextTimePicker.tsx index 692790f5361ee..47b3b1526c884 100644 --- a/packages/x-date-pickers/src/MobileNextTimePicker/MobileNextTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileNextTimePicker/MobileNextTimePicker.tsx @@ -252,9 +252,17 @@ MobileNextTimePicker.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx b/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx index 6a0dec8232558..e8b58c3e7d556 100644 --- a/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx @@ -306,9 +306,17 @@ MobileTimePicker.propTypes = { * @returns {string} The formatted string. */ rifmFormatter: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/NextDateTimePicker/NextDateTimePicker.tsx b/packages/x-date-pickers/src/NextDateTimePicker/NextDateTimePicker.tsx index 4c297b24218c3..43424d5d90d11 100644 --- a/packages/x-date-pickers/src/NextDateTimePicker/NextDateTimePicker.tsx +++ b/packages/x-date-pickers/src/NextDateTimePicker/NextDateTimePicker.tsx @@ -291,6 +291,14 @@ NextDateTimePicker.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -307,7 +315,7 @@ NextDateTimePicker.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/NextTimePicker/NextTimePicker.tsx b/packages/x-date-pickers/src/NextTimePicker/NextTimePicker.tsx index c73fd5f02f685..b4797f258d2a3 100644 --- a/packages/x-date-pickers/src/NextTimePicker/NextTimePicker.tsx +++ b/packages/x-date-pickers/src/NextTimePicker/NextTimePicker.tsx @@ -219,9 +219,17 @@ NextTimePicker.propTypes = { startIndex: PropTypes.number.isRequired, }), ]), + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx index 95f081c7bdf0b..dbbc49b148a05 100644 --- a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx @@ -390,6 +390,14 @@ StaticDateTimePicker.propTypes = { * @returns {string} The formatted string. */ rifmFormatter: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -406,7 +414,7 @@ StaticDateTimePicker.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/StaticNextDateTimePicker/StaticNextDateTimePicker.tsx b/packages/x-date-pickers/src/StaticNextDateTimePicker/StaticNextDateTimePicker.tsx index 5ff9f14946648..22886206484a2 100644 --- a/packages/x-date-pickers/src/StaticNextDateTimePicker/StaticNextDateTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticNextDateTimePicker/StaticNextDateTimePicker.tsx @@ -257,6 +257,14 @@ StaticNextDateTimePicker.propTypes = { * @default () => ... */ renderLoading: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific date. * @template TDate @@ -273,7 +281,7 @@ StaticNextDateTimePicker.propTypes = { shouldDisableMonth: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/StaticNextTimePicker/StaticNextTimePicker.tsx b/packages/x-date-pickers/src/StaticNextTimePicker/StaticNextTimePicker.tsx index 4591dd8461630..30bec861250dc 100644 --- a/packages/x-date-pickers/src/StaticNextTimePicker/StaticNextTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticNextTimePicker/StaticNextTimePicker.tsx @@ -174,9 +174,17 @@ StaticNextTimePicker.propTypes = { */ orientation: PropTypes.oneOf(['landscape', 'portrait']), readOnly: PropTypes.bool, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx b/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx index 9f10d2fa87408..c59268d83a00d 100644 --- a/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx @@ -303,9 +303,17 @@ StaticTimePicker.propTypes = { * @returns {string} The formatted string. */ rifmFormatter: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/TimeClock/TimeClock.test.tsx b/packages/x-date-pickers/src/TimeClock/TimeClock.test.tsx index db29c1d595724..0c1b90f901e6d 100644 --- a/packages/x-date-pickers/src/TimeClock/TimeClock.test.tsx +++ b/packages/x-date-pickers/src/TimeClock/TimeClock.test.tsx @@ -173,20 +173,20 @@ describe('', () => { expect(reason).to.equal('partial'); }); - it('should call `shouldDisableTime` with the hours with meridiem', () => { - const shouldDisableTime = spy(() => false); + it('should call `shouldDisableClock` with the hours with meridiem', () => { + const shouldDisableClock = spy(() => false); render( {}} - shouldDisableTime={shouldDisableTime} + shouldDisableClock={shouldDisableClock} ampm />, ); - const hours = shouldDisableTime + const hours = shouldDisableClock .getCalls() .filter((el) => el.lastArg === 'hours') .map((el) => el.firstArg); diff --git a/packages/x-date-pickers/src/TimeClock/TimeClock.tsx b/packages/x-date-pickers/src/TimeClock/TimeClock.tsx index 9049d67a1005e..2f144aad68fac 100644 --- a/packages/x-date-pickers/src/TimeClock/TimeClock.tsx +++ b/packages/x-date-pickers/src/TimeClock/TimeClock.tsx @@ -184,6 +184,7 @@ export const TimeClock = React.forwardRef(function TimeClock({ minTime, maxTime, minutesStep, + shouldDisableClock, shouldDisableTime, disableIgnoringDatePartForTimeValidation, selectedSections, @@ -66,6 +67,7 @@ export const useTimeField = ({ minTime, maxTime, minutesStep, + shouldDisableClock, shouldDisableTime, disableIgnoringDatePartForTimeValidation, selectedSections, diff --git a/packages/x-date-pickers/src/TimePicker/TimePicker.tsx b/packages/x-date-pickers/src/TimePicker/TimePicker.tsx index 0aa6b368d81a3..4a7018c872298 100644 --- a/packages/x-date-pickers/src/TimePicker/TimePicker.tsx +++ b/packages/x-date-pickers/src/TimePicker/TimePicker.tsx @@ -285,9 +285,17 @@ TimePicker.propTypes = { * @returns {string} The formatted string. */ rifmFormatter: PropTypes.func, + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock: PropTypes.func, /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ diff --git a/packages/x-date-pickers/src/internals/hooks/validation/models.ts b/packages/x-date-pickers/src/internals/hooks/validation/models.ts index ca6adc01e56ad..1269474a24622 100644 --- a/packages/x-date-pickers/src/internals/hooks/validation/models.ts +++ b/packages/x-date-pickers/src/internals/hooks/validation/models.ts @@ -40,11 +40,19 @@ export interface TimeValidationProps { minutesStep?: number; /** * Disable specific time. - * @param {number} timeValue The value to check. + * @param {TDate} value The value to check. * @param {TimeView} view The clock type of the timeValue. * @returns {boolean} If `true` the time will be disabled. */ - shouldDisableTime?: (timeValue: number, view: TimeView) => boolean; + shouldDisableTime?: (value: TDate, view: TimeView) => boolean; + /** + * Disable specific clock time. + * @param {number} clockValue The value to check. + * @param {TimeView} view The clock type of the timeValue. + * @returns {boolean} If `true` the time will be disabled. + * @deprecated Consider using `shouldDisableTime`. + */ + shouldDisableClock?: (clockValue: number, view: TimeView) => boolean; /** * Do not ignore date part when validating min/max time. * @default false diff --git a/packages/x-date-pickers/src/internals/hooks/validation/useTimeValidation.ts b/packages/x-date-pickers/src/internals/hooks/validation/useTimeValidation.ts index 013b8a9ded70d..4336cde3fbc30 100644 --- a/packages/x-date-pickers/src/internals/hooks/validation/useTimeValidation.ts +++ b/packages/x-date-pickers/src/internals/hooks/validation/useTimeValidation.ts @@ -15,6 +15,9 @@ export type TimeValidationError = | 'minutesStep' | 'minTime' | 'maxTime' + | 'shouldDisableClock-hours' + | 'shouldDisableClock-minutes' + | 'shouldDisableClock-seconds' | 'shouldDisableTime-hours' | 'shouldDisableTime-minutes' | 'shouldDisableTime-seconds'; @@ -29,6 +32,7 @@ export const validateTime: Validator< minTime, maxTime, minutesStep, + shouldDisableClock, shouldDisableTime, disableIgnoringDatePartForTimeValidation = false, disablePast, @@ -62,18 +66,27 @@ export const validateTime: Validator< case Boolean(disablePast && adapter.utils.isBefore(date, now)): return 'disablePast'; - case Boolean(shouldDisableTime && shouldDisableTime(adapter.utils.getHours(value), 'hours')): + case Boolean(shouldDisableTime && shouldDisableTime(value, 'hours')): return 'shouldDisableTime-hours'; + case Boolean(shouldDisableTime && shouldDisableTime(value, 'minutes')): + return 'shouldDisableTime-minutes'; + + case Boolean(shouldDisableTime && shouldDisableTime(value, 'seconds')): + return 'shouldDisableTime-seconds'; + + case Boolean(shouldDisableClock && shouldDisableClock(adapter.utils.getHours(value), 'hours')): + return 'shouldDisableClock-hours'; + case Boolean( - shouldDisableTime && shouldDisableTime(adapter.utils.getMinutes(value), 'minutes'), + shouldDisableClock && shouldDisableClock(adapter.utils.getMinutes(value), 'minutes'), ): - return 'shouldDisableTime-minutes'; + return 'shouldDisableClock-minutes'; case Boolean( - shouldDisableTime && shouldDisableTime(adapter.utils.getSeconds(value), 'seconds'), + shouldDisableClock && shouldDisableClock(adapter.utils.getSeconds(value), 'seconds'), ): - return 'shouldDisableTime-seconds'; + return 'shouldDisableClock-seconds'; case Boolean(minutesStep && adapter.utils.getMinutes(value) % minutesStep !== 0): return 'minutesStep'; diff --git a/packages/x-date-pickers/src/internals/utils/validation.ts b/packages/x-date-pickers/src/internals/utils/validation.ts index 2d8d8f2d210fb..9e8252267762b 100644 --- a/packages/x-date-pickers/src/internals/utils/validation.ts +++ b/packages/x-date-pickers/src/internals/utils/validation.ts @@ -10,6 +10,7 @@ const VALIDATION_PROP_NAMES = [ 'shouldDisableDate', 'shouldDisableMonth', 'shouldDisableYear', + 'shouldDisableClock', 'shouldDisableTime', 'minuteStep', ] as const; diff --git a/packages/x-date-pickers/src/tests/describeValidation/testTextFieldValidation.tsx b/packages/x-date-pickers/src/tests/describeValidation/testTextFieldValidation.tsx index ccb6032cfb595..347ec851196dd 100644 --- a/packages/x-date-pickers/src/tests/describeValidation/testTextFieldValidation.tsx +++ b/packages/x-date-pickers/src/tests/describeValidation/testTextFieldValidation.tsx @@ -4,6 +4,7 @@ import { spy } from 'sinon'; import { screen } from '@mui/monorepo/test/utils'; import TextField from '@mui/material/TextField'; import { adapterToUse } from 'test/utils/pickers-utils'; +import { TimeView } from '@mui/x-date-pickers/internals'; import { DescribeValidationTestSuite } from './describeValidation.types'; export const testTextFieldValidation: DescribeValidationTestSuite = (ElementToTest, getOptions) => { @@ -116,6 +117,102 @@ export const testTextFieldValidation: DescribeValidationTestSuite = (ElementToTe expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'false'); }); + it('should apply shouldDisableClock', function test() { + if (!withTime) { + return; + } + + const onErrorMock = spy(); + const { setProps } = render( + value === 10} + value={adapterToUse.date(new Date(2018, 2, 12, 10, 5, 0))} + />, + ); + + expect(onErrorMock.callCount).to.equal(1); + expect(onErrorMock.lastCall.args[0]).to.equal('shouldDisableClock-hours'); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'true'); + + setProps({ value: adapterToUse.date(new Date(2019, 2, 12, 9, 5, 0)) }); + + expect(onErrorMock.callCount).to.equal(2); + expect(onErrorMock.lastCall.args[0]).to.equal(null); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'false'); + + setProps({ value: adapterToUse.date(new Date(2018, 2, 12, 9, 10, 0)) }); + + expect(onErrorMock.callCount).to.equal(3); + expect(onErrorMock.lastCall.args[0]).to.equal('shouldDisableClock-minutes'); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'true'); + + setProps({ value: adapterToUse.date(new Date(2018, 2, 12, 9, 9, 0)) }); + + expect(onErrorMock.callCount).to.equal(4); + expect(onErrorMock.lastCall.args[0]).to.equal(null); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'false'); + + setProps({ value: adapterToUse.date(new Date(2018, 2, 12, 9, 9, 10)) }); + + expect(onErrorMock.callCount).to.equal(5); + expect(onErrorMock.lastCall.args[0]).to.equal('shouldDisableClock-seconds'); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'true'); + }); + + it('should apply shouldDisableTime', function test() { + if (!withTime) { + return; + } + + const onErrorMock = spy(); + const { setProps } = render( + { + let comparingValue = adapterToUse.getHours(value); + if (view === 'minutes') { + comparingValue = adapterToUse.getMinutes(value); + } else if (view === 'seconds') { + comparingValue = adapterToUse.getSeconds(value); + } + return comparingValue === 10; + }} + value={adapterToUse.date(new Date(2018, 2, 12, 10, 5, 0))} + />, + ); + + expect(onErrorMock.callCount).to.equal(1); + expect(onErrorMock.lastCall.args[0]).to.equal('shouldDisableTime-hours'); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'true'); + + setProps({ value: adapterToUse.date(new Date(2019, 2, 12, 9, 5, 0)) }); + + expect(onErrorMock.callCount).to.equal(2); + expect(onErrorMock.lastCall.args[0]).to.equal(null); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'false'); + + setProps({ value: adapterToUse.date(new Date(2018, 2, 12, 9, 10, 0)) }); + + expect(onErrorMock.callCount).to.equal(3); + expect(onErrorMock.lastCall.args[0]).to.equal('shouldDisableTime-minutes'); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'true'); + + setProps({ value: adapterToUse.date(new Date(2018, 2, 12, 9, 9, 0)) }); + + expect(onErrorMock.callCount).to.equal(4); + expect(onErrorMock.lastCall.args[0]).to.equal(null); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'false'); + + setProps({ value: adapterToUse.date(new Date(2018, 2, 12, 9, 9, 10)) }); + + expect(onErrorMock.callCount).to.equal(5); + expect(onErrorMock.lastCall.args[0]).to.equal('shouldDisableTime-seconds'); + expect(screen.getByRole('textbox')).to.have.attribute('aria-invalid', 'true'); + }); + it('should apply disablePast', function test() { if (!withDate) { return;