@mui/x-date-pickers 6.9.2 → 6.10.1

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.
Files changed (45) hide show
  1. package/AdapterDayjs/AdapterDayjs.js +1 -1
  2. package/AdapterLuxon/AdapterLuxon.js +2 -2
  3. package/CHANGELOG.md +301 -114
  4. package/DateTimePicker/DateTimePickerToolbar.js +1 -10
  5. package/PickersDay/PickersDay.js +2 -1
  6. package/TimePicker/TimePickerToolbar.js +1 -6
  7. package/dateTimeViewRenderers/dateTimeViewRenderers.js +2 -2
  8. package/index.js +1 -1
  9. package/internals/components/pickersToolbarClasses.d.ts +1 -5
  10. package/internals/components/pickersToolbarClasses.js +1 -1
  11. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
  12. package/internals/hooks/useField/useFieldState.js +8 -8
  13. package/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
  14. package/internals/hooks/useStaticPicker/useStaticPicker.js +2 -2
  15. package/legacy/AdapterDayjs/AdapterDayjs.js +1 -1
  16. package/legacy/AdapterLuxon/AdapterLuxon.js +2 -2
  17. package/legacy/DateTimePicker/DateTimePickerToolbar.js +12 -20
  18. package/legacy/PickersDay/PickersDay.js +2 -1
  19. package/legacy/TimePicker/TimePickerToolbar.js +1 -4
  20. package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +2 -2
  21. package/legacy/index.js +1 -1
  22. package/legacy/internals/components/pickersToolbarClasses.js +1 -1
  23. package/legacy/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
  24. package/legacy/internals/hooks/useField/useFieldState.js +10 -10
  25. package/legacy/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
  26. package/legacy/internals/hooks/useStaticPicker/useStaticPicker.js +2 -2
  27. package/legacy/locales/nbNO.js +25 -11
  28. package/locales/nbNO.js +9 -11
  29. package/modern/AdapterDayjs/AdapterDayjs.js +1 -1
  30. package/modern/DateTimePicker/DateTimePickerToolbar.js +1 -10
  31. package/modern/PickersDay/PickersDay.js +2 -1
  32. package/modern/TimePicker/TimePickerToolbar.js +1 -6
  33. package/modern/index.js +1 -1
  34. package/modern/internals/components/pickersToolbarClasses.js +1 -1
  35. package/modern/internals/hooks/useField/useFieldState.js +8 -8
  36. package/modern/locales/nbNO.js +9 -11
  37. package/node/AdapterDayjs/AdapterDayjs.js +1 -1
  38. package/node/DateTimePicker/DateTimePickerToolbar.js +1 -10
  39. package/node/PickersDay/PickersDay.js +2 -1
  40. package/node/TimePicker/TimePickerToolbar.js +1 -6
  41. package/node/index.js +1 -1
  42. package/node/internals/components/pickersToolbarClasses.js +1 -1
  43. package/node/internals/hooks/useField/useFieldState.js +8 -8
  44. package/node/locales/nbNO.js +9 -11
  45. package/package.json +3 -3
@@ -9,7 +9,7 @@ import { buildWarning } from '../internals/utils/warning';
9
9
  defaultDayjs.extend(customParseFormatPlugin);
10
10
  defaultDayjs.extend(localizedFormatPlugin);
11
11
  defaultDayjs.extend(isBetweenPlugin);
12
- const localeNotFoundWarning = buildWarning(['Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', "Or you forget to import the locale with `require('dayjs/locale/{localeUsed}')`", 'fallback on English locale']);
12
+ const localeNotFoundWarning = buildWarning(['Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale']);
13
13
  const formatTokenMap = {
14
14
  // Year
15
15
  YY: 'year',
@@ -262,14 +262,14 @@ export class AdapterLuxon {
262
262
  };
263
263
  /* istanbul ignore next */
264
264
  this.is12HourCycleInCurrentLocale = () => {
265
- var _Intl$DateTimeFormat, _Intl$DateTimeFormat$;
265
+ var _Intl$DateTimeFormat;
266
266
  if (typeof Intl === 'undefined' || typeof Intl.DateTimeFormat === 'undefined') {
267
267
  return true; // Luxon defaults to en-US if Intl not found
268
268
  }
269
269
 
270
270
  return Boolean((_Intl$DateTimeFormat = new Intl.DateTimeFormat(this.locale, {
271
271
  hour: 'numeric'
272
- })) == null ? void 0 : (_Intl$DateTimeFormat$ = _Intl$DateTimeFormat.resolvedOptions()) == null ? void 0 : _Intl$DateTimeFormat$.hour12);
272
+ })) == null || (_Intl$DateTimeFormat = _Intl$DateTimeFormat.resolvedOptions()) == null ? void 0 : _Intl$DateTimeFormat.hour12);
273
273
  };
274
274
  this.expandFormat = format => {
275
275
  // Extract escaped section to avoid extending them