Skip to content

Commit

Permalink
[pickers] Add referenceDate on picker components
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Aug 14, 2023
1 parent b4d7611 commit 257d094
Show file tree
Hide file tree
Showing 66 changed files with 304 additions and 24 deletions.
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => <span data-mui-test=\"loading-progress\">...</span>",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/date-range-calendar.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => \"...\"",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => \"...\"",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => <span data-mui-test=\"loading-progress\">...</span>",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/desktop-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => <span data-mui-test=\"loading-progress\">...</span>",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/desktop-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => \"...\"",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/desktop-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => <span data-mui-test=\"loading-progress\">...</span>",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/desktop-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"selectedSections": {
"type": {
"name": "union",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/mobile-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => <span data-mui-test=\"loading-progress\">...</span>",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/mobile-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => \"...\"",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/mobile-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => <span data-mui-test=\"loading-progress\">...</span>",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/mobile-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"selectedSections": {
"type": {
"name": "union",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/static-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => <span data-mui-test=\"loading-progress\">...</span>",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/static-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => \"...\"",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/static-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
"type": { "name": "bool" },
"default": "typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)"
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"renderLoading": {
"type": { "name": "func" },
"default": "() => <span data-mui-test=\"loading-progress\">...</span>",
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/static-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"shouldDisableClock": {
"type": { "name": "func" },
"deprecated": true,
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/date-pickers/time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"referenceDate": {
"type": { "name": "any" },
"default": "The closest valid date-time using the validation props, except callbacks such as `shouldDisableDate`."
},
"selectedSections": {
"type": {
"name": "union",
Expand Down
5 changes: 5 additions & 0 deletions docs/translations/api-docs/date-pickers/date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
5 changes: 5 additions & 0 deletions docs/translations/api-docs/date-pickers/date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"selectedSections": {
"description": "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 <code>startIndex</code> and <code>endIndex</code> properties are provided, the sections between those two indexes will be selected. 3. If a string of type <code>FieldSectionType</code> is provided, the first section with that name will be selected. 4. If <code>null</code> is provided, no section will be selected If not provided, the selected sections will be handled internally.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"selectedSections": {
"description": "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 <code>startIndex</code> and <code>endIndex</code> properties are provided, the sections between those two indexes will be selected. 3. If a string of type <code>FieldSectionType</code> is provided, the first section with that name will be selected. 4. If <code>null</code> is provided, no section will be selected If not provided, the selected sections will be handled internally.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"renderLoading": {
"description": "Component displaying when passed <code>loading</code> true.",
"deprecated": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"shouldDisableClock": {
"description": "Disable specific clock time.",
"deprecated": "",
Expand Down
5 changes: 5 additions & 0 deletions docs/translations/api-docs/date-pickers/time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@
"deprecated": "",
"typeDescriptions": {}
},
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty.",
"deprecated": "",
"typeDescriptions": {}
},
"selectedSections": {
"description": "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 <code>startIndex</code> and <code>endIndex</code> properties are provided, the sections between those two indexes will be selected. 3. If a string of type <code>FieldSectionType</code> is provided, the first section with that name will be selected. 4. If <code>null</code> is provided, no section will be selected If not provided, the selected sections will be handled internally.",
"deprecated": "",
Expand Down
Loading

0 comments on commit 257d094

Please sign in to comment.