@octanejs/day-picker 0.0.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.
- package/LICENSE +21 -0
- package/README.md +14 -0
- package/UPSTREAM.md +24 -0
- package/package.json +77 -0
- package/src/DayPicker.tsrx +717 -0
- package/src/UI.ts +121 -0
- package/src/classes/CalendarDay.ts +82 -0
- package/src/classes/CalendarMonth.ts +20 -0
- package/src/classes/CalendarWeek.ts +19 -0
- package/src/classes/DateLib.ts +695 -0
- package/src/classes/index.ts +4 -0
- package/src/components/custom-components.tsrx +237 -0
- package/src/formatters/formatCaption.ts +18 -0
- package/src/formatters/formatDay.ts +17 -0
- package/src/formatters/formatMonthDropdown.ts +16 -0
- package/src/formatters/formatWeekNumber.ts +19 -0
- package/src/formatters/formatWeekNumberHeader.ts +11 -0
- package/src/formatters/formatWeekdayName.ts +17 -0
- package/src/formatters/formatYearDropdown.ts +15 -0
- package/src/formatters/index.ts +7 -0
- package/src/helpers/calculateFocusTarget.ts +79 -0
- package/src/helpers/createGetModifiers.ts +117 -0
- package/src/helpers/endOfBroadcastWeek.ts +22 -0
- package/src/helpers/getBroadcastWeeksInMonth.ts +32 -0
- package/src/helpers/getClassNamesForModifiers.ts +38 -0
- package/src/helpers/getComponents.ts +19 -0
- package/src/helpers/getDataAttributes.ts +17 -0
- package/src/helpers/getDates.ts +87 -0
- package/src/helpers/getDays.ts +19 -0
- package/src/helpers/getDefaultClassNames.ts +36 -0
- package/src/helpers/getDisplayMonths.ts +30 -0
- package/src/helpers/getFocusableDate.ts +66 -0
- package/src/helpers/getFormatters.ts +16 -0
- package/src/helpers/getInitialMonth.ts +35 -0
- package/src/helpers/getLabels.ts +93 -0
- package/src/helpers/getMonthOptions.ts +45 -0
- package/src/helpers/getMonths.ts +89 -0
- package/src/helpers/getNavMonth.ts +35 -0
- package/src/helpers/getNextFocus.ts +45 -0
- package/src/helpers/getNextMonth.ts +46 -0
- package/src/helpers/getPreviousMonth.ts +45 -0
- package/src/helpers/getStyleForModifiers.ts +31 -0
- package/src/helpers/getWeekdays.ts +33 -0
- package/src/helpers/getWeeks.ts +14 -0
- package/src/helpers/getYearOptions.ts +43 -0
- package/src/helpers/index.ts +2 -0
- package/src/helpers/startOfBroadcastWeek.ts +26 -0
- package/src/helpers/useControlledValue.ts +38 -0
- package/src/index.ts +13 -0
- package/src/labels/index.ts +12 -0
- package/src/labels/labelDayButton.ts +29 -0
- package/src/labels/labelGrid.ts +18 -0
- package/src/labels/labelGridcell.ts +26 -0
- package/src/labels/labelMonthDropdown.ts +14 -0
- package/src/labels/labelNav.ts +11 -0
- package/src/labels/labelNext.ts +17 -0
- package/src/labels/labelPrevious.ts +13 -0
- package/src/labels/labelWeekNumber.ts +15 -0
- package/src/labels/labelWeekNumberHeader.ts +14 -0
- package/src/labels/labelWeekday.ts +16 -0
- package/src/labels/labelYearDropdown.ts +14 -0
- package/src/locale/af.ts +48 -0
- package/src/locale/ar-DZ.ts +48 -0
- package/src/locale/ar-EG.ts +48 -0
- package/src/locale/ar-MA.ts +48 -0
- package/src/locale/ar-SA.ts +48 -0
- package/src/locale/ar-TN.ts +48 -0
- package/src/locale/ar.ts +48 -0
- package/src/locale/az.ts +48 -0
- package/src/locale/be-tarask.ts +51 -0
- package/src/locale/be.ts +48 -0
- package/src/locale/bg.ts +48 -0
- package/src/locale/bn.ts +48 -0
- package/src/locale/bs.ts +48 -0
- package/src/locale/ca.ts +48 -0
- package/src/locale/ckb.ts +51 -0
- package/src/locale/cs.ts +48 -0
- package/src/locale/cy.ts +48 -0
- package/src/locale/da.ts +48 -0
- package/src/locale/de-AT.ts +48 -0
- package/src/locale/de.ts +48 -0
- package/src/locale/el.ts +48 -0
- package/src/locale/en-AU.ts +48 -0
- package/src/locale/en-CA.ts +48 -0
- package/src/locale/en-GB.ts +51 -0
- package/src/locale/en-IE.ts +48 -0
- package/src/locale/en-IN.ts +48 -0
- package/src/locale/en-NZ.ts +48 -0
- package/src/locale/en-US.ts +72 -0
- package/src/locale/en-ZA.ts +48 -0
- package/src/locale/eo.ts +48 -0
- package/src/locale/es.ts +48 -0
- package/src/locale/et.ts +48 -0
- package/src/locale/eu.ts +48 -0
- package/src/locale/fa-IR.ts +48 -0
- package/src/locale/fi.ts +48 -0
- package/src/locale/fr-CA.ts +48 -0
- package/src/locale/fr-CH.ts +48 -0
- package/src/locale/fr.ts +48 -0
- package/src/locale/fy.ts +48 -0
- package/src/locale/gd.ts +48 -0
- package/src/locale/gl.ts +48 -0
- package/src/locale/gu.ts +48 -0
- package/src/locale/he.ts +48 -0
- package/src/locale/hi.ts +48 -0
- package/src/locale/hr.ts +48 -0
- package/src/locale/ht.ts +48 -0
- package/src/locale/hu.ts +48 -0
- package/src/locale/hy.ts +48 -0
- package/src/locale/id.ts +48 -0
- package/src/locale/is.ts +48 -0
- package/src/locale/it-CH.ts +48 -0
- package/src/locale/it.ts +48 -0
- package/src/locale/ja-Hira.ts +48 -0
- package/src/locale/ja.ts +48 -0
- package/src/locale/ka.ts +48 -0
- package/src/locale/kk.ts +48 -0
- package/src/locale/km.ts +48 -0
- package/src/locale/kn.ts +48 -0
- package/src/locale/ko.ts +48 -0
- package/src/locale/lb.ts +48 -0
- package/src/locale/lt.ts +48 -0
- package/src/locale/lv.ts +48 -0
- package/src/locale/mk.ts +48 -0
- package/src/locale/mn.ts +48 -0
- package/src/locale/ms.ts +48 -0
- package/src/locale/mt.ts +48 -0
- package/src/locale/nb.ts +48 -0
- package/src/locale/nl-BE.ts +48 -0
- package/src/locale/nl.ts +48 -0
- package/src/locale/nn.ts +48 -0
- package/src/locale/oc.ts +48 -0
- package/src/locale/pl.ts +48 -0
- package/src/locale/pt-BR.ts +48 -0
- package/src/locale/pt.ts +48 -0
- package/src/locale/ro.ts +48 -0
- package/src/locale/ru.ts +48 -0
- package/src/locale/se.ts +48 -0
- package/src/locale/sk.ts +48 -0
- package/src/locale/sl.ts +48 -0
- package/src/locale/sq.ts +48 -0
- package/src/locale/sr-Latn.ts +48 -0
- package/src/locale/sr.ts +48 -0
- package/src/locale/sv.ts +48 -0
- package/src/locale/ta.ts +48 -0
- package/src/locale/te.ts +48 -0
- package/src/locale/th.ts +48 -0
- package/src/locale/tr.ts +48 -0
- package/src/locale/ug.ts +48 -0
- package/src/locale/uk.ts +48 -0
- package/src/locale/uz-Cyrl.ts +48 -0
- package/src/locale/uz.ts +48 -0
- package/src/locale/vi.ts +48 -0
- package/src/locale/zh-CN.ts +48 -0
- package/src/locale/zh-HK.ts +51 -0
- package/src/locale/zh-TW.ts +51 -0
- package/src/locale.ts +108 -0
- package/src/noonDateLib.ts +202 -0
- package/src/selection/useMulti.ts +74 -0
- package/src/selection/useRange.ts +89 -0
- package/src/selection/useSingle.ts +77 -0
- package/src/style.css +451 -0
- package/src/style.css.d.ts +3 -0
- package/src/style.module.css +451 -0
- package/src/style.module.css.d.ts +29 -0
- package/src/types/index.ts +3 -0
- package/src/types/props.ts +671 -0
- package/src/types/selection.ts +97 -0
- package/src/types/shared.ts +346 -0
- package/src/useAnimation.ts +242 -0
- package/src/useCalendar.ts +233 -0
- package/src/useDayPicker.ts +91 -0
- package/src/useFocus.ts +109 -0
- package/src/useSelection.ts +36 -0
- package/src/utils/addToRange.ts +91 -0
- package/src/utils/convertMatchersToTimeZone.ts +88 -0
- package/src/utils/dateMatchModifiers.ts +72 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/rangeContainsDayOfWeek.ts +33 -0
- package/src/utils/rangeContainsModifiers.ts +106 -0
- package/src/utils/rangeIncludesDate.ts +40 -0
- package/src/utils/rangeOverlaps.ts +26 -0
- package/src/utils/toTimeZone.ts +13 -0
- package/src/utils/typeguards.ts +71 -0
- package/status.json +13 -0
package/src/locale/hr.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { hr as dateFnsHr } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Croatian locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const hr: DayPickerLocale = {
|
|
9
|
+
...dateFnsHr,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Danas, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, odabrano`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Odaberite mjesec',
|
|
24
|
+
labelNext: 'Prijeđi na sljedeći mjesec',
|
|
25
|
+
labelPrevious: 'Prijeđi na prethodni mjesec',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Tjedan ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Odaberite godinu',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Danas, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigacijska traka',
|
|
44
|
+
labelWeekNumberHeader: 'Broj tjedna',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/ht.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ht as dateFnsHt } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Haitian Creole locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const ht: DayPickerLocale = {
|
|
9
|
+
...dateFnsHt,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Jodi a, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, chwazi`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Chwazi mwa a',
|
|
24
|
+
labelNext: 'Ale nan pwochen mwa',
|
|
25
|
+
labelPrevious: 'Ale nan mwa anvan',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Semèn ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Chwazi ane a',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Jodi a, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Ba navigasyon',
|
|
44
|
+
labelWeekNumberHeader: 'Nimewo semèn',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/hu.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { hu as dateFnsHu } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Hungarian locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const hu: DayPickerLocale = {
|
|
9
|
+
...dateFnsHu,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Ma, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, kiválasztva`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Válassza ki a hónapot',
|
|
24
|
+
labelNext: 'Ugrás a következő hónapra',
|
|
25
|
+
labelPrevious: 'Ugrás az előző hónapra',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Hét ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Válassza ki az évet',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Ma, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Navigációs sáv',
|
|
44
|
+
labelWeekNumberHeader: 'Hét száma',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/hy.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { hy as dateFnsHy } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Armenian locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const hy: DayPickerLocale = {
|
|
9
|
+
...dateFnsHy,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Այսօր, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, ընտրված`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Ընտրեք ամիսը',
|
|
24
|
+
labelNext: 'Անցնել հաջորդ ամսին',
|
|
25
|
+
labelPrevious: 'Անցնել նախորդ ամսին',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Շաբաթ ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Ընտրեք տարին',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Այսօր, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Նավիգացիայի վահանակ',
|
|
44
|
+
labelWeekNumberHeader: 'Շաբաթվա համարը',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/id.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { id as dateFnsId } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Indonesian locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const id: DayPickerLocale = {
|
|
9
|
+
...dateFnsId,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Hari ini, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, dipilih`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Pilih bulan',
|
|
24
|
+
labelNext: 'Ke bulan berikutnya',
|
|
25
|
+
labelPrevious: 'Ke bulan sebelumnya',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Minggu ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Pilih tahun',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Hari ini, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Bilah navigasi',
|
|
44
|
+
labelWeekNumberHeader: 'Nomor minggu',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/is.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { is as dateFnsIs } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Icelandic locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const is: DayPickerLocale = {
|
|
9
|
+
...dateFnsIs,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Í dag, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, valið`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Veldu mánuð',
|
|
24
|
+
labelNext: 'Farðu í næsta mánuð',
|
|
25
|
+
labelPrevious: 'Farðu í fyrri mánuð',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Vika ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Veldu árið',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Í dag, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Leiðarstika',
|
|
44
|
+
labelWeekNumberHeader: 'Vikunúmer',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { itCH as dateFnsItCH } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Italian (Switzerland) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const itCH: DayPickerLocale = {
|
|
9
|
+
...dateFnsItCH,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Oggi, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, selezionato`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Scegli il mese',
|
|
24
|
+
labelNext: 'Vai al mese successivo',
|
|
25
|
+
labelPrevious: 'Vai al mese precedente',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Settimana ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: "Scegli l'anno",
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Oggi, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Barra di navigazione',
|
|
44
|
+
labelWeekNumberHeader: 'Numero settimana',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/it.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { it as dateFnsIt } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Italian locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const it: DayPickerLocale = {
|
|
9
|
+
...dateFnsIt,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Oggi, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, selezionato`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Scegli il mese',
|
|
24
|
+
labelNext: 'Vai al mese successivo',
|
|
25
|
+
labelPrevious: 'Vai al mese precedente',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Settimana ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Scegli l’anno',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Oggi, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Barra di navigazione',
|
|
44
|
+
labelWeekNumberHeader: 'Numero settimana',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jaHira as dateFnsJaHira } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Japanese (Hiragana) locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const jaHira: DayPickerLocale = {
|
|
9
|
+
...dateFnsJaHira,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `きょう、${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}、せんたくずみ`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'つきをえらぶ',
|
|
24
|
+
labelNext: 'つぎのつきへ',
|
|
25
|
+
labelPrevious: 'まえのつきへ',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `しゅう ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'としをえらぶ',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `きょう、${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'なびげえしょんばあ',
|
|
44
|
+
labelWeekNumberHeader: 'しゅうばんごう',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/ja.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ja as dateFnsJa } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Japanese locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const ja: DayPickerLocale = {
|
|
9
|
+
...dateFnsJa,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `今日、${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}、選択済み`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: '月を選択',
|
|
24
|
+
labelNext: '次の月へ',
|
|
25
|
+
labelPrevious: '前の月へ',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `第${weekNumber}週`,
|
|
27
|
+
labelYearDropdown: '年を選択',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `今日、${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'ナビゲーションバー',
|
|
44
|
+
labelWeekNumberHeader: '週番号',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/ka.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ka as dateFnsKa } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Georgian locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const ka: DayPickerLocale = {
|
|
9
|
+
...dateFnsKa,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `დღეს, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, მონიშნული`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'აირჩიეთ თვე',
|
|
24
|
+
labelNext: 'გადასვლა შემდეგ თვეზე',
|
|
25
|
+
labelPrevious: 'გადასვლა წინა თვეზე',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `კვირა ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'აირჩიეთ წელი',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `დღეს, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'ნავიგაციის ზოლი',
|
|
44
|
+
labelWeekNumberHeader: 'კვირის ნომერი',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/kk.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { kk as dateFnsKk } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Kazakh locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const kk: DayPickerLocale = {
|
|
9
|
+
...dateFnsKk,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `Бүгін, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, таңдалған`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'Айды таңдаңыз',
|
|
24
|
+
labelNext: 'Келесі айға өту',
|
|
25
|
+
labelPrevious: 'Алдыңғы айға өту',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `Апта ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'Жылды таңдаңыз',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `Бүгін, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'Навигация жолағы',
|
|
44
|
+
labelWeekNumberHeader: 'Апта нөмірі',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/km.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { km as dateFnsKm } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Khmer locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const km: DayPickerLocale = {
|
|
9
|
+
...dateFnsKm,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `ថ្ងៃនេះ, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, បានជ្រើស`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'ជ្រើសខែ',
|
|
24
|
+
labelNext: 'ទៅខែក្រោយ',
|
|
25
|
+
labelPrevious: 'ទៅខែមុន',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `សប្ដាហ៍ ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'ជ្រើសឆ្នាំ',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `ថ្ងៃនេះ, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'របាររុករក',
|
|
44
|
+
labelWeekNumberHeader: 'លេខសប្ដាហ៍',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|
package/src/locale/kn.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { kn as dateFnsKn } from 'date-fns/locale';
|
|
2
|
+
|
|
3
|
+
import type { DateLibOptions, DayPickerLocale } from '../classes/DateLib.js';
|
|
4
|
+
import { DateLib } from '../classes/DateLib.js';
|
|
5
|
+
import type { Modifiers } from '../types/index.js';
|
|
6
|
+
|
|
7
|
+
/** Kannada locale extended with DayPicker-specific translations. */
|
|
8
|
+
export const kn: DayPickerLocale = {
|
|
9
|
+
...dateFnsKn,
|
|
10
|
+
labels: {
|
|
11
|
+
labelDayButton: (
|
|
12
|
+
date: Date,
|
|
13
|
+
modifiers: Modifiers,
|
|
14
|
+
options?: DateLibOptions,
|
|
15
|
+
dateLib?: DateLib,
|
|
16
|
+
) => {
|
|
17
|
+
const lib = dateLib ?? new DateLib(options);
|
|
18
|
+
let label = lib.format(date, 'PPPP');
|
|
19
|
+
if (modifiers.today) label = `ಇಂದು, ${label}`;
|
|
20
|
+
if (modifiers.selected) label = `${label}, ಆಯ್ಕೆ ಮಾಡಿದ`;
|
|
21
|
+
return label;
|
|
22
|
+
},
|
|
23
|
+
labelMonthDropdown: 'ತಿಂಗಳ ಆಯ್ಕೆ',
|
|
24
|
+
labelNext: 'ಮುಂದಿನ ತಿಂಗಳಿಗೆ ಹೋಗಿ',
|
|
25
|
+
labelPrevious: 'ಹಿಂದಿನ ತಿಂಗಳಿಗೆ ಹೋಗಿ',
|
|
26
|
+
labelWeekNumber: (weekNumber: number) => `ವಾರ ${weekNumber}`,
|
|
27
|
+
labelYearDropdown: 'ವರ್ಷ ಆಯ್ಕೆಮಾಡಿ',
|
|
28
|
+
labelGrid: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
29
|
+
(dateLib ?? new DateLib(options)).formatMonthYear(date),
|
|
30
|
+
labelGridcell: (
|
|
31
|
+
date: Date,
|
|
32
|
+
modifiers?: Modifiers,
|
|
33
|
+
options?: DateLibOptions,
|
|
34
|
+
dateLib?: DateLib,
|
|
35
|
+
) => {
|
|
36
|
+
const lib = dateLib ?? new DateLib(options);
|
|
37
|
+
let label = lib.format(date, 'PPPP');
|
|
38
|
+
if (modifiers?.today) {
|
|
39
|
+
label = `ಇಂದು, ${label}`;
|
|
40
|
+
}
|
|
41
|
+
return label;
|
|
42
|
+
},
|
|
43
|
+
labelNav: 'ನವಿಗೇಶನ್ ಪಟ್ಟೆ',
|
|
44
|
+
labelWeekNumberHeader: 'ವಾರ ಸಂಖ್ಯೆ',
|
|
45
|
+
labelWeekday: (date: Date, options?: DateLibOptions, dateLib?: DateLib) =>
|
|
46
|
+
(dateLib ?? new DateLib(options)).format(date, 'cccc'),
|
|
47
|
+
},
|
|
48
|
+
};
|