@mui/x-date-pickers 6.18.2 → 6.18.3
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.
- package/CHANGELOG.md +59 -0
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +2 -0
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +3 -2
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +2 -1
- package/index.js +1 -1
- package/internals/hooks/useField/useField.utils.js +23 -10
- package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +2 -0
- package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/hooks/useField/useField.utils.js +23 -10
- package/locales/beBY.d.ts +18 -5
- package/locales/caES.d.ts +18 -5
- package/locales/csCZ.d.ts +18 -5
- package/locales/daDK.d.ts +18 -5
- package/locales/deDE.d.ts +18 -5
- package/locales/elGR.d.ts +18 -5
- package/locales/enUS.d.ts +18 -5
- package/locales/esES.d.ts +18 -5
- package/locales/eu.d.ts +18 -5
- package/locales/faIR.d.ts +18 -5
- package/locales/fiFI.d.ts +18 -5
- package/locales/frFR.d.ts +18 -5
- package/locales/heIL.d.ts +18 -5
- package/locales/huHU.d.ts +18 -5
- package/locales/isIS.d.ts +18 -5
- package/locales/itIT.d.ts +18 -5
- package/locales/jaJP.d.ts +18 -5
- package/locales/koKR.d.ts +18 -5
- package/locales/kzKZ.d.ts +18 -5
- package/locales/mk.d.ts +18 -5
- package/locales/nbNO.d.ts +18 -5
- package/locales/nlNL.d.ts +18 -5
- package/locales/plPL.d.ts +18 -5
- package/locales/ptBR.d.ts +18 -5
- package/locales/roRO.d.ts +18 -5
- package/locales/ruRU.d.ts +18 -5
- package/locales/skSK.d.ts +18 -5
- package/locales/svSE.d.ts +18 -5
- package/locales/trTR.d.ts +18 -5
- package/locales/ukUA.d.ts +18 -5
- package/locales/urPK.d.ts +18 -5
- package/locales/utils/getPickersLocalization.d.ts +18 -5
- package/locales/utils/pickersLocaleTextApi.d.ts +18 -5
- package/locales/viVN.d.ts +18 -5
- package/locales/zhCN.d.ts +18 -5
- package/locales/zhHK.d.ts +18 -5
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +2 -0
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +2 -1
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useField/useField.utils.js +23 -10
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +2 -0
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +2 -1
- package/node/index.js +1 -1
- package/node/internals/hooks/useField/useField.utils.js +23 -10
- package/package.json +1 -1
package/locales/skSK.d.ts
CHANGED
|
@@ -31,18 +31,31 @@ export declare const skSK: {
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
package/locales/svSE.d.ts
CHANGED
|
@@ -31,18 +31,31 @@ export declare const svSE: {
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
package/locales/trTR.d.ts
CHANGED
|
@@ -31,18 +31,31 @@ export declare const trTR: {
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
package/locales/ukUA.d.ts
CHANGED
|
@@ -31,18 +31,31 @@ export declare const ukUA: {
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
package/locales/urPK.d.ts
CHANGED
|
@@ -31,18 +31,31 @@ export declare const urPK: {
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
|
@@ -31,18 +31,31 @@ export declare const getPickersLocalization: (pickersTranslations: Partial<Picke
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("../..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("../..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
|
@@ -50,18 +50,31 @@ export interface PickersComponentAgnosticLocaleText<TDate> {
|
|
|
50
50
|
dateTableLabel: string;
|
|
51
51
|
fieldYearPlaceholder: (params: {
|
|
52
52
|
digitAmount: number;
|
|
53
|
+
format: string;
|
|
53
54
|
}) => string;
|
|
54
55
|
fieldMonthPlaceholder: (params: {
|
|
55
56
|
contentType: FieldSectionContentType;
|
|
57
|
+
format: string;
|
|
58
|
+
}) => string;
|
|
59
|
+
fieldDayPlaceholder: (params: {
|
|
60
|
+
format: string;
|
|
56
61
|
}) => string;
|
|
57
|
-
fieldDayPlaceholder: () => string;
|
|
58
62
|
fieldWeekDayPlaceholder: (params: {
|
|
59
63
|
contentType: FieldSectionContentType;
|
|
64
|
+
format: string;
|
|
65
|
+
}) => string;
|
|
66
|
+
fieldHoursPlaceholder: (params: {
|
|
67
|
+
format: string;
|
|
68
|
+
}) => string;
|
|
69
|
+
fieldMinutesPlaceholder: (params: {
|
|
70
|
+
format: string;
|
|
71
|
+
}) => string;
|
|
72
|
+
fieldSecondsPlaceholder: (params: {
|
|
73
|
+
format: string;
|
|
74
|
+
}) => string;
|
|
75
|
+
fieldMeridiemPlaceholder: (params: {
|
|
76
|
+
format: string;
|
|
60
77
|
}) => string;
|
|
61
|
-
fieldHoursPlaceholder: () => string;
|
|
62
|
-
fieldMinutesPlaceholder: () => string;
|
|
63
|
-
fieldSecondsPlaceholder: () => string;
|
|
64
|
-
fieldMeridiemPlaceholder: () => string;
|
|
65
78
|
}
|
|
66
79
|
export interface PickersLocaleText<TDate> extends PickersComponentAgnosticLocaleText<TDate>, PickersComponentSpecificLocaleText {
|
|
67
80
|
}
|
package/locales/viVN.d.ts
CHANGED
|
@@ -31,18 +31,31 @@ export declare const viVN: {
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
package/locales/zhCN.d.ts
CHANGED
|
@@ -31,18 +31,31 @@ export declare const zhCN: {
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
package/locales/zhHK.d.ts
CHANGED
|
@@ -31,18 +31,31 @@ export declare const zhHK: {
|
|
|
31
31
|
dateTableLabel?: string | undefined;
|
|
32
32
|
fieldYearPlaceholder?: ((params: {
|
|
33
33
|
digitAmount: number;
|
|
34
|
+
format: string;
|
|
34
35
|
}) => string) | undefined;
|
|
35
36
|
fieldMonthPlaceholder?: ((params: {
|
|
36
37
|
contentType: import("..").FieldSectionContentType;
|
|
38
|
+
format: string;
|
|
39
|
+
}) => string) | undefined;
|
|
40
|
+
fieldDayPlaceholder?: ((params: {
|
|
41
|
+
format: string;
|
|
37
42
|
}) => string) | undefined;
|
|
38
|
-
fieldDayPlaceholder?: (() => string) | undefined;
|
|
39
43
|
fieldWeekDayPlaceholder?: ((params: {
|
|
40
44
|
contentType: import("..").FieldSectionContentType;
|
|
45
|
+
format: string;
|
|
46
|
+
}) => string) | undefined;
|
|
47
|
+
fieldHoursPlaceholder?: ((params: {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => string) | undefined;
|
|
50
|
+
fieldMinutesPlaceholder?: ((params: {
|
|
51
|
+
format: string;
|
|
52
|
+
}) => string) | undefined;
|
|
53
|
+
fieldSecondsPlaceholder?: ((params: {
|
|
54
|
+
format: string;
|
|
55
|
+
}) => string) | undefined;
|
|
56
|
+
fieldMeridiemPlaceholder?: ((params: {
|
|
57
|
+
format: string;
|
|
41
58
|
}) => string) | undefined;
|
|
42
|
-
fieldHoursPlaceholder?: (() => string) | undefined;
|
|
43
|
-
fieldMinutesPlaceholder?: (() => string) | undefined;
|
|
44
|
-
fieldSecondsPlaceholder?: (() => string) | undefined;
|
|
45
|
-
fieldMeridiemPlaceholder?: (() => string) | undefined;
|
|
46
59
|
datePickerToolbarTitle?: string | undefined;
|
|
47
60
|
timePickerToolbarTitle?: string | undefined;
|
|
48
61
|
dateTimePickerToolbarTitle?: string | undefined;
|
|
@@ -254,6 +254,7 @@ export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function M
|
|
|
254
254
|
},
|
|
255
255
|
items: getTimeSectionOptions({
|
|
256
256
|
value: utils.getMinutes(valueOrReferenceDate),
|
|
257
|
+
utils,
|
|
257
258
|
isDisabled: minutes => disabled || isTimeDisabled(minutes, 'minutes'),
|
|
258
259
|
resolveLabel: minutes => utils.format(utils.setMinutes(now, minutes), 'minutes'),
|
|
259
260
|
timeStep: timeSteps.minutes,
|
|
@@ -270,6 +271,7 @@ export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function M
|
|
|
270
271
|
},
|
|
271
272
|
items: getTimeSectionOptions({
|
|
272
273
|
value: utils.getSeconds(valueOrReferenceDate),
|
|
274
|
+
utils,
|
|
273
275
|
isDisabled: seconds => disabled || isTimeDisabled(seconds, 'seconds'),
|
|
274
276
|
resolveLabel: seconds => utils.format(utils.setSeconds(now, seconds), 'seconds'),
|
|
275
277
|
timeStep: timeSteps.seconds,
|
|
@@ -38,6 +38,7 @@ export const getHourSectionOptions = ({
|
|
|
38
38
|
};
|
|
39
39
|
export const getTimeSectionOptions = ({
|
|
40
40
|
value,
|
|
41
|
+
utils,
|
|
41
42
|
isDisabled,
|
|
42
43
|
timeStep,
|
|
43
44
|
resolveLabel,
|
|
@@ -56,7 +57,7 @@ export const getTimeSectionOptions = ({
|
|
|
56
57
|
const timeValue = timeStep * index;
|
|
57
58
|
return {
|
|
58
59
|
value: timeValue,
|
|
59
|
-
label: resolveLabel(timeValue),
|
|
60
|
+
label: utils.formatNumber(resolveLabel(timeValue)),
|
|
60
61
|
isDisabled,
|
|
61
62
|
isSelected,
|
|
62
63
|
ariaLabel: resolveAriaLabel(timeValue.toString())
|
package/modern/index.js
CHANGED
|
@@ -207,49 +207,62 @@ export const addPositionPropertiesToSections = (sections, isRTL) => {
|
|
|
207
207
|
}
|
|
208
208
|
return newSections;
|
|
209
209
|
};
|
|
210
|
-
const getSectionPlaceholder = (utils, timezone, localeText, sectionConfig,
|
|
210
|
+
const getSectionPlaceholder = (utils, timezone, localeText, sectionConfig, sectionFormat) => {
|
|
211
211
|
switch (sectionConfig.type) {
|
|
212
212
|
case 'year':
|
|
213
213
|
{
|
|
214
214
|
return localeText.fieldYearPlaceholder({
|
|
215
|
-
digitAmount: utils.formatByString(utils.dateWithTimezone(undefined, timezone),
|
|
215
|
+
digitAmount: utils.formatByString(utils.dateWithTimezone(undefined, timezone), sectionFormat).length,
|
|
216
|
+
format: sectionFormat
|
|
216
217
|
});
|
|
217
218
|
}
|
|
218
219
|
case 'month':
|
|
219
220
|
{
|
|
220
221
|
return localeText.fieldMonthPlaceholder({
|
|
221
|
-
contentType: sectionConfig.contentType
|
|
222
|
+
contentType: sectionConfig.contentType,
|
|
223
|
+
format: sectionFormat
|
|
222
224
|
});
|
|
223
225
|
}
|
|
224
226
|
case 'day':
|
|
225
227
|
{
|
|
226
|
-
return localeText.fieldDayPlaceholder(
|
|
228
|
+
return localeText.fieldDayPlaceholder({
|
|
229
|
+
format: sectionFormat
|
|
230
|
+
});
|
|
227
231
|
}
|
|
228
232
|
case 'weekDay':
|
|
229
233
|
{
|
|
230
234
|
return localeText.fieldWeekDayPlaceholder({
|
|
231
|
-
contentType: sectionConfig.contentType
|
|
235
|
+
contentType: sectionConfig.contentType,
|
|
236
|
+
format: sectionFormat
|
|
232
237
|
});
|
|
233
238
|
}
|
|
234
239
|
case 'hours':
|
|
235
240
|
{
|
|
236
|
-
return localeText.fieldHoursPlaceholder(
|
|
241
|
+
return localeText.fieldHoursPlaceholder({
|
|
242
|
+
format: sectionFormat
|
|
243
|
+
});
|
|
237
244
|
}
|
|
238
245
|
case 'minutes':
|
|
239
246
|
{
|
|
240
|
-
return localeText.fieldMinutesPlaceholder(
|
|
247
|
+
return localeText.fieldMinutesPlaceholder({
|
|
248
|
+
format: sectionFormat
|
|
249
|
+
});
|
|
241
250
|
}
|
|
242
251
|
case 'seconds':
|
|
243
252
|
{
|
|
244
|
-
return localeText.fieldSecondsPlaceholder(
|
|
253
|
+
return localeText.fieldSecondsPlaceholder({
|
|
254
|
+
format: sectionFormat
|
|
255
|
+
});
|
|
245
256
|
}
|
|
246
257
|
case 'meridiem':
|
|
247
258
|
{
|
|
248
|
-
return localeText.fieldMeridiemPlaceholder(
|
|
259
|
+
return localeText.fieldMeridiemPlaceholder({
|
|
260
|
+
format: sectionFormat
|
|
261
|
+
});
|
|
249
262
|
}
|
|
250
263
|
default:
|
|
251
264
|
{
|
|
252
|
-
return
|
|
265
|
+
return sectionFormat;
|
|
253
266
|
}
|
|
254
267
|
}
|
|
255
268
|
};
|
|
@@ -263,6 +263,7 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
|
|
|
263
263
|
},
|
|
264
264
|
items: (0, _MultiSectionDigitalClock.getTimeSectionOptions)({
|
|
265
265
|
value: utils.getMinutes(valueOrReferenceDate),
|
|
266
|
+
utils,
|
|
266
267
|
isDisabled: minutes => disabled || isTimeDisabled(minutes, 'minutes'),
|
|
267
268
|
resolveLabel: minutes => utils.format(utils.setMinutes(now, minutes), 'minutes'),
|
|
268
269
|
timeStep: timeSteps.minutes,
|
|
@@ -279,6 +280,7 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
|
|
|
279
280
|
},
|
|
280
281
|
items: (0, _MultiSectionDigitalClock.getTimeSectionOptions)({
|
|
281
282
|
value: utils.getSeconds(valueOrReferenceDate),
|
|
283
|
+
utils,
|
|
282
284
|
isDisabled: seconds => disabled || isTimeDisabled(seconds, 'seconds'),
|
|
283
285
|
resolveLabel: seconds => utils.format(utils.setSeconds(now, seconds), 'seconds'),
|
|
284
286
|
timeStep: timeSteps.seconds,
|
|
@@ -45,6 +45,7 @@ const getHourSectionOptions = ({
|
|
|
45
45
|
exports.getHourSectionOptions = getHourSectionOptions;
|
|
46
46
|
const getTimeSectionOptions = ({
|
|
47
47
|
value,
|
|
48
|
+
utils,
|
|
48
49
|
isDisabled,
|
|
49
50
|
timeStep,
|
|
50
51
|
resolveLabel,
|
|
@@ -63,7 +64,7 @@ const getTimeSectionOptions = ({
|
|
|
63
64
|
const timeValue = timeStep * index;
|
|
64
65
|
return {
|
|
65
66
|
value: timeValue,
|
|
66
|
-
label: resolveLabel(timeValue),
|
|
67
|
+
label: utils.formatNumber(resolveLabel(timeValue)),
|
|
67
68
|
isDisabled,
|
|
68
69
|
isSelected,
|
|
69
70
|
ariaLabel: resolveAriaLabel(timeValue.toString())
|
package/node/index.js
CHANGED
|
@@ -223,49 +223,62 @@ const addPositionPropertiesToSections = (sections, isRTL) => {
|
|
|
223
223
|
return newSections;
|
|
224
224
|
};
|
|
225
225
|
exports.addPositionPropertiesToSections = addPositionPropertiesToSections;
|
|
226
|
-
const getSectionPlaceholder = (utils, timezone, localeText, sectionConfig,
|
|
226
|
+
const getSectionPlaceholder = (utils, timezone, localeText, sectionConfig, sectionFormat) => {
|
|
227
227
|
switch (sectionConfig.type) {
|
|
228
228
|
case 'year':
|
|
229
229
|
{
|
|
230
230
|
return localeText.fieldYearPlaceholder({
|
|
231
|
-
digitAmount: utils.formatByString(utils.dateWithTimezone(undefined, timezone),
|
|
231
|
+
digitAmount: utils.formatByString(utils.dateWithTimezone(undefined, timezone), sectionFormat).length,
|
|
232
|
+
format: sectionFormat
|
|
232
233
|
});
|
|
233
234
|
}
|
|
234
235
|
case 'month':
|
|
235
236
|
{
|
|
236
237
|
return localeText.fieldMonthPlaceholder({
|
|
237
|
-
contentType: sectionConfig.contentType
|
|
238
|
+
contentType: sectionConfig.contentType,
|
|
239
|
+
format: sectionFormat
|
|
238
240
|
});
|
|
239
241
|
}
|
|
240
242
|
case 'day':
|
|
241
243
|
{
|
|
242
|
-
return localeText.fieldDayPlaceholder(
|
|
244
|
+
return localeText.fieldDayPlaceholder({
|
|
245
|
+
format: sectionFormat
|
|
246
|
+
});
|
|
243
247
|
}
|
|
244
248
|
case 'weekDay':
|
|
245
249
|
{
|
|
246
250
|
return localeText.fieldWeekDayPlaceholder({
|
|
247
|
-
contentType: sectionConfig.contentType
|
|
251
|
+
contentType: sectionConfig.contentType,
|
|
252
|
+
format: sectionFormat
|
|
248
253
|
});
|
|
249
254
|
}
|
|
250
255
|
case 'hours':
|
|
251
256
|
{
|
|
252
|
-
return localeText.fieldHoursPlaceholder(
|
|
257
|
+
return localeText.fieldHoursPlaceholder({
|
|
258
|
+
format: sectionFormat
|
|
259
|
+
});
|
|
253
260
|
}
|
|
254
261
|
case 'minutes':
|
|
255
262
|
{
|
|
256
|
-
return localeText.fieldMinutesPlaceholder(
|
|
263
|
+
return localeText.fieldMinutesPlaceholder({
|
|
264
|
+
format: sectionFormat
|
|
265
|
+
});
|
|
257
266
|
}
|
|
258
267
|
case 'seconds':
|
|
259
268
|
{
|
|
260
|
-
return localeText.fieldSecondsPlaceholder(
|
|
269
|
+
return localeText.fieldSecondsPlaceholder({
|
|
270
|
+
format: sectionFormat
|
|
271
|
+
});
|
|
261
272
|
}
|
|
262
273
|
case 'meridiem':
|
|
263
274
|
{
|
|
264
|
-
return localeText.fieldMeridiemPlaceholder(
|
|
275
|
+
return localeText.fieldMeridiemPlaceholder({
|
|
276
|
+
format: sectionFormat
|
|
277
|
+
});
|
|
265
278
|
}
|
|
266
279
|
default:
|
|
267
280
|
{
|
|
268
|
-
return
|
|
281
|
+
return sectionFormat;
|
|
269
282
|
}
|
|
270
283
|
}
|
|
271
284
|
};
|