@mui/x-date-pickers 9.10.1 → 9.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,6 +64,15 @@ export declare class AdapterDayjs implements MuiPickersAdapter<string> {
64
64
  * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72
65
65
  */
66
66
  protected adjustOffset: (value: Dayjs) => Dayjs;
67
+ /**
68
+ * On dates predating the timezone standardization, IANA falls back on the Local Mean Time of the
69
+ * location, whose offset is not a round number of minutes (`Asia/Kolkata` is `GMT+05:53:28`).
70
+ * `dayjs` then moves the day of the month when only the year or the month was meant to change.
71
+ * `daysInMonth()` is unusable on such a value because it derives from the equally broken
72
+ * `endOf('month')`, hence computing it on a plain UTC value instead.
73
+ * See https://github.com/mui/mui-x/issues/23163
74
+ */
75
+ private restoreDayOfMonth;
67
76
  date: <T extends string | null | undefined>(value?: T, timezone?: PickersTimezone) => DateBuilderReturnType<T>;
68
77
  getInvalidDate: () => Dayjs;
69
78
  getTimezone: (value: Dayjs) => string;
@@ -64,6 +64,15 @@ export declare class AdapterDayjs implements MuiPickersAdapter<string> {
64
64
  * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72
65
65
  */
66
66
  protected adjustOffset: (value: Dayjs) => Dayjs;
67
+ /**
68
+ * On dates predating the timezone standardization, IANA falls back on the Local Mean Time of the
69
+ * location, whose offset is not a round number of minutes (`Asia/Kolkata` is `GMT+05:53:28`).
70
+ * `dayjs` then moves the day of the month when only the year or the month was meant to change.
71
+ * `daysInMonth()` is unusable on such a value because it derives from the equally broken
72
+ * `endOf('month')`, hence computing it on a plain UTC value instead.
73
+ * See https://github.com/mui/mui-x/issues/23163
74
+ */
75
+ private restoreDayOfMonth;
67
76
  date: <T extends string | null | undefined>(value?: T, timezone?: PickersTimezone) => DateBuilderReturnType<T>;
68
77
  getInvalidDate: () => Dayjs;
69
78
  getTimezone: (value: Dayjs) => string;
@@ -282,6 +282,36 @@ class AdapterDayjs {
282
282
  }
283
283
  return value;
284
284
  };
285
+
286
+ /**
287
+ * On dates predating the timezone standardization, IANA falls back on the Local Mean Time of the
288
+ * location, whose offset is not a round number of minutes (`Asia/Kolkata` is `GMT+05:53:28`).
289
+ * `dayjs` then moves the day of the month when only the year or the month was meant to change.
290
+ * `daysInMonth()` is unusable on such a value because it derives from the equally broken
291
+ * `endOf('month')`, hence computing it on a plain UTC value instead.
292
+ * See https://github.com/mui/mui-x/issues/23163
293
+ */
294
+ restoreDayOfMonth = (value, reference) => {
295
+ const timezone = this.getTimezone(value);
296
+ // `system` and `UTC` values keep an offset that matches their instant, so they are never affected.
297
+ if (!this.hasUTCPlugin() || timezone === 'system' || timezone === 'UTC') {
298
+ return value;
299
+ }
300
+ const wallClock = _dayjs.default.utc(value.format('YYYY-MM-DDTHH:mm:ss.SSS'));
301
+
302
+ // Years above 9999 don't round-trip through the ISO format, and an invalid value formats to
303
+ // `Invalid Date`. Both would make the comparison below `NaN`.
304
+ if (!wallClock.isValid()) {
305
+ return value;
306
+ }
307
+
308
+ // A shorter target month legitimately clamps the day (`Jan 31` + 1 month is `Feb 28`).
309
+ const expectedDayOfMonth = Math.min(reference.date(), wallClock.daysInMonth());
310
+ if (value.date() === expectedDayOfMonth) {
311
+ return value;
312
+ }
313
+ return value.set('date', expectedDayOfMonth);
314
+ };
285
315
  date = (value, timezone = 'default') => {
286
316
  if (value === null) {
287
317
  return null;
@@ -456,10 +486,10 @@ class AdapterDayjs {
456
486
  return this.adjustOffset(value.endOf('day'));
457
487
  };
458
488
  addYears = (value, amount) => {
459
- return this.adjustOffset(value.add(amount, 'year'));
489
+ return this.adjustOffset(this.restoreDayOfMonth(value.add(amount, 'year'), value));
460
490
  };
461
491
  addMonths = (value, amount) => {
462
- return this.adjustOffset(value.add(amount, 'month'));
492
+ return this.adjustOffset(this.restoreDayOfMonth(value.add(amount, 'month'), value));
463
493
  };
464
494
  addWeeks = (value, amount) => {
465
495
  return this.adjustOffset(value.add(amount, 'week'));
@@ -498,10 +528,10 @@ class AdapterDayjs {
498
528
  return value.millisecond();
499
529
  };
500
530
  setYear = (value, year) => {
501
- return this.adjustOffset(value.set('year', year));
531
+ return this.adjustOffset(this.restoreDayOfMonth(value.set('year', year), value));
502
532
  };
503
533
  setMonth = (value, month) => {
504
- return this.adjustOffset(value.set('month', month));
534
+ return this.adjustOffset(this.restoreDayOfMonth(value.set('month', month), value));
505
535
  };
506
536
  setDate = (value, date) => {
507
537
  return this.adjustOffset(value.set('date', date));
@@ -273,6 +273,36 @@ export class AdapterDayjs {
273
273
  }
274
274
  return value;
275
275
  };
276
+
277
+ /**
278
+ * On dates predating the timezone standardization, IANA falls back on the Local Mean Time of the
279
+ * location, whose offset is not a round number of minutes (`Asia/Kolkata` is `GMT+05:53:28`).
280
+ * `dayjs` then moves the day of the month when only the year or the month was meant to change.
281
+ * `daysInMonth()` is unusable on such a value because it derives from the equally broken
282
+ * `endOf('month')`, hence computing it on a plain UTC value instead.
283
+ * See https://github.com/mui/mui-x/issues/23163
284
+ */
285
+ restoreDayOfMonth = (value, reference) => {
286
+ const timezone = this.getTimezone(value);
287
+ // `system` and `UTC` values keep an offset that matches their instant, so they are never affected.
288
+ if (!this.hasUTCPlugin() || timezone === 'system' || timezone === 'UTC') {
289
+ return value;
290
+ }
291
+ const wallClock = dayjs.utc(value.format('YYYY-MM-DDTHH:mm:ss.SSS'));
292
+
293
+ // Years above 9999 don't round-trip through the ISO format, and an invalid value formats to
294
+ // `Invalid Date`. Both would make the comparison below `NaN`.
295
+ if (!wallClock.isValid()) {
296
+ return value;
297
+ }
298
+
299
+ // A shorter target month legitimately clamps the day (`Jan 31` + 1 month is `Feb 28`).
300
+ const expectedDayOfMonth = Math.min(reference.date(), wallClock.daysInMonth());
301
+ if (value.date() === expectedDayOfMonth) {
302
+ return value;
303
+ }
304
+ return value.set('date', expectedDayOfMonth);
305
+ };
276
306
  date = (value, timezone = 'default') => {
277
307
  if (value === null) {
278
308
  return null;
@@ -447,10 +477,10 @@ export class AdapterDayjs {
447
477
  return this.adjustOffset(value.endOf('day'));
448
478
  };
449
479
  addYears = (value, amount) => {
450
- return this.adjustOffset(value.add(amount, 'year'));
480
+ return this.adjustOffset(this.restoreDayOfMonth(value.add(amount, 'year'), value));
451
481
  };
452
482
  addMonths = (value, amount) => {
453
- return this.adjustOffset(value.add(amount, 'month'));
483
+ return this.adjustOffset(this.restoreDayOfMonth(value.add(amount, 'month'), value));
454
484
  };
455
485
  addWeeks = (value, amount) => {
456
486
  return this.adjustOffset(value.add(amount, 'week'));
@@ -489,10 +519,10 @@ export class AdapterDayjs {
489
519
  return value.millisecond();
490
520
  };
491
521
  setYear = (value, year) => {
492
- return this.adjustOffset(value.set('year', year));
522
+ return this.adjustOffset(this.restoreDayOfMonth(value.set('year', year), value));
493
523
  };
494
524
  setMonth = (value, month) => {
495
- return this.adjustOffset(value.set('month', month));
525
+ return this.adjustOffset(this.restoreDayOfMonth(value.set('month', month), value));
496
526
  };
497
527
  setDate = (value, date) => {
498
528
  return this.adjustOffset(value.set('date', date));
package/CHANGELOG.md CHANGED
@@ -1,5 +1,123 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.11.0
4
+
5
+ _Aug 6, 2026_
6
+
7
+ We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
8
+
9
+ - ✨ Add `addItems()` and `getItemSelection()` API methods to Tree View
10
+
11
+ Special thanks go out to these community members for their valuable contributions:
12
+ @12joan, @Anexus5919, @kevincorizi-sbt, @mixelburg, @mustafajw07, @strazto
13
+
14
+ The following team members contributed to this release:
15
+ @flaviendelangle, @hasdfa, @JCQuintas, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@9.11.0`
20
+
21
+ - [DataGrid] Fix `updateRows` stripping class prototypes from rows in datasource mode (#22288) @mixelburg
22
+ - [DataGrid] Do not re-fetch data when an `Activity` becomes visible (#22603) @12joan
23
+ - [DataGrid] Fix toolbar button stealing focus when a sibling's disabled state changes (#23204) @MBilalShafi
24
+
25
+ #### `@mui/x-data-grid-pro@9.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
26
+
27
+ Same changes as in `@mui/x-data-grid@9.11.0`.
28
+
29
+ #### `@mui/x-data-grid-premium@9.11.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
30
+
31
+ Same changes as in `@mui/x-data-grid-pro@9.11.0`.
32
+
33
+ ### Date and Time Pickers
34
+
35
+ #### `@mui/x-date-pickers@9.11.0`
36
+
37
+ - [pickers] Fix day shift when editing dates predating timezone standardization (#23296) @JCQuintas
38
+
39
+ #### `@mui/x-date-pickers-pro@9.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
40
+
41
+ Same changes as in `@mui/x-date-pickers@9.11.0`, plus:
42
+
43
+ - [DateRangePicker] Fix disabled filler cells showing the range highlight (#23293) @JCQuintas
44
+
45
+ ### Charts
46
+
47
+ #### `@mui/x-charts@9.11.0`
48
+
49
+ - [charts] Activate the focused item with `Enter`/`Space` (#23218) @JCQuintas
50
+ - [charts] Extract the axis click payload builders (#23215) @JCQuintas
51
+ - [charts] Fix `GestureManager` event listener leak on chart unmount (#23283) @kevincorizi-sbt
52
+ - [charts] Fix `slotProps.legend.position` and `direction` in `RadarChart` (#23254) @JCQuintas
53
+ - [charts] Fix axis clicks being discarded on slight pointer movement (#23244) @noraleonte
54
+ - [charts] Fix image export of charts sized by their parent element (#23255) @JCQuintas
55
+ - [charts] Forward `experimentalFeatures` on `RadarChart` and `Heatmap` (#23216) @JCQuintas
56
+ - [charts] Hide focus indicator when the chart loses focus (#23213) @JCQuintas
57
+
58
+ #### `@mui/x-charts-pro@9.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
59
+
60
+ Same changes as in `@mui/x-charts@9.11.0`.
61
+
62
+ #### `@mui/x-charts-premium@9.11.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
63
+
64
+ Same changes as in `@mui/x-charts-pro@9.11.0`, plus:
65
+
66
+ - [charts-premium] Fix `RangeBar` type override (#23217) @JCQuintas
67
+
68
+ ### Tree View
69
+
70
+ #### `@mui/x-tree-view@9.11.0`
71
+
72
+ - [tree view] Add `addItems()` API method (#23159) @JCQuintas
73
+ - [tree view] Add `getItemSelection` API method (#23257) @noraleonte
74
+ - [tree view] Ignore `keepExistingSelection` when `multiSelect` is `false` (#23242) @JCQuintas
75
+ - [tree view] Prevent duplicate ids in multi-select arrow navigation (#23006) @Anexus5919
76
+
77
+ #### `@mui/x-tree-view-pro@9.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
78
+
79
+ Same changes as in `@mui/x-tree-view@9.11.0`, plus:
80
+
81
+ - [tree view] Discard superseded lazy-loading responses (#23005) @Anexus5919
82
+
83
+ ### Scheduler
84
+
85
+ #### `@mui/x-scheduler@9.0.0-beta.8`
86
+
87
+ - [scheduler] Add `localeText` prop to standalone views (#23210) @rita-codes
88
+ - [scheduler] Finetune touch experience for time grid events and introduce editing drawer (#22624) @noraleonte
89
+ - [scheduler] Introduce the edit dialog form context & lifecycle contract (#23284) @rita-codes
90
+ - [scheduler] Refactor edit dialog General tab into section components (#23206) @rita-codes
91
+ - [scheduler] Replace copied Base UI internals with `@base-ui/react/internals` imports (#21972) @flaviendelangle
92
+ - [scheduler] Hide resource picker when no resources are provided (#23290) @mustafajw07
93
+ - [scheduler] Support multi-resource occurrences in `EventTimeline` (#23240) @mustafajw07
94
+
95
+ #### `@mui/x-scheduler-premium@9.0.0-beta.8` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
96
+
97
+ Same changes as in `@mui/x-scheduler@9.0.0-beta.8`.
98
+
99
+ ### Codemod
100
+
101
+ #### `@mui/x-codemod@9.11.0`
102
+
103
+ - [codemod] Remove unused `@babel/core` and `@babel/traverse` dependencies (#23245) @LukasTy
104
+
105
+ ### Docs
106
+
107
+ - [docs] Add recipe for adding new rows from clipboard copy (#22913) @michelengelen
108
+ - [docs] Clarify the package versions in v8 upgrade guides (#22376) @strazto
109
+ - [docs] Replace README peer dependency lists with an npm install command (#23256) @LukasTy
110
+
111
+ ### Core
112
+
113
+ - [code-infra] Align action pin version comments (#23238) @LukasTy
114
+
115
+ ### Miscellaneous
116
+
117
+ - [chat] Drop the undeclared `@mui/icons-material` dependency (#23252) @LukasTy
118
+ - [chat] Sanitize image part URLs and share the URL allow-list with markdown (#23058) @hasdfa
119
+ - [test] Type the `PickersTextField` test stub instead of `as any` (#23194) @LukasTy
120
+
3
121
  ## 9.10.1
4
122
 
5
123
  _Jul 23, 2026_
package/README.md CHANGED
@@ -8,7 +8,7 @@ It's part of [MUI X](https://mui.com/x/), an open-core extension of our Core li
8
8
  Install the package in your project directory with:
9
9
 
10
10
  ```bash
11
- npm install @mui/x-date-pickers
11
+ npm install @mui/x-date-pickers @mui/material @emotion/react @emotion/styled
12
12
  ```
13
13
 
14
14
  Then install the date library of your choice (if not already installed).
@@ -33,16 +33,6 @@ npm install luxon
33
33
  npm install moment
34
34
  ```
35
35
 
36
- This component has the following peer dependencies that you need to install as well.
37
-
38
- ```json
39
- "peerDependencies": {
40
- "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
41
- "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
42
- "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
43
- },
44
- ```
45
-
46
36
  After completing the installation, you have to set the `dateAdapter` prop of the `LocalizationProvider` accordingly.
47
37
  The supported adapters are exported from `@mui/x-date-pickers`.
48
38
 
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v9.10.1
2
+ * @mui/x-date-pickers v9.11.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v9.10.1
2
+ * @mui/x-date-pickers v9.11.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "9.10.1",
3
+ "version": "9.11.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The community edition of the MUI X Date and Time Picker components.",
6
6
  "license": "MIT",
@@ -34,12 +34,12 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.29.7",
37
- "@mui/utils": "^9.2.0",
37
+ "@mui/utils": "^9.3.0",
38
38
  "@types/react-transition-group": "^4.4.12",
39
39
  "clsx": "^2.1.1",
40
40
  "prop-types": "^15.8.1",
41
41
  "react-transition-group": "^4.4.5",
42
- "@mui/x-internals": "^9.10.1"
42
+ "@mui/x-internals": "^9.11.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@emotion/react": "^11.9.0",