Skip to content

Commit 9af6960

Browse files
authored
fix: the semantic error in Calendar description (#6886)
feat(CalendarPicker): the first selection is for the beginning and the end
1 parent 65a9298 commit 9af6960

File tree

13 files changed

+16
-0
lines changed

13 files changed

+16
-0
lines changed

src/components/calendar-picker-view/calendar-picker-view.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ export const CalendarPickerView = forwardRef<
284284
}
285285

286286
if (props.selectionMode === 'range') {
287+
if (isBegin && isEnd) {
288+
return contentWrapper(locale.Calendar.startAndEnd)
289+
}
290+
287291
if (isBegin) {
288292
return contentWrapper(locale.Calendar.start)
289293
}

src/locales/ar-SA.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const arSA = mergeLocale(base, {
1616
'confirm': 'تأكيد',
1717
'start': 'يبدأ',
1818
'end': 'ينهي',
19+
'startAndEnd': 'يبدأ/ينهي',
1920
'today': 'اليوم',
2021
'markItems': ['واحد', 'اثنين', 'ثلاثة', 'أربعة', 'خمسة', 'ستة', 'يوم'],
2122
'yearAndMonth': '${year} سنة ${month} شهر',

src/locales/base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const base = {
1313
confirm: 'Confirm',
1414
start: 'start',
1515
end: 'end',
16+
startAndEnd: 'start/end',
1617
today: 'today',
1718
markItems: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
1819
yearAndMonth: '${year}/${month}',

src/locales/cnr-ME.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const cnrME = mergeLocale(base, {
1616
confirm: 'Potvrdi',
1717
start: 'početak',
1818
end: 'kraj',
19+
startAndEnd: 'početak/kraj',
1920
today: 'danas',
2021
markItems: ['Pon', 'Uto', 'Sre', 'Čet', 'Pet', 'Sub', 'Ned'],
2122
yearAndMonth: '${year}/${month}',

src/locales/de-DE.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const deDE = mergeLocale(base, {
1616
'confirm': 'Bestätigen',
1717
'start': 'Starten',
1818
'end': 'Beenden',
19+
'startAndEnd': 'Starten/Beenden',
1920
'today': 'Heute',
2021
'markItems': ['I', 'II', 'III', 'IV', 'V', 'Sechs', 'Tag'],
2122
'yearAndMonth': '${year}Jahr${month}Monat',

src/locales/hr-HR.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const hrHR = mergeLocale(base, {
1616
confirm: 'Potvrdi',
1717
start: 'početak',
1818
end: 'kraj',
19+
startAndEnd: 'početak/kraj',
1920
today: 'danas',
2021
markItems: ['Pon', 'Uto', 'Sri', 'Čet', 'Pet', 'Sub', 'Ned'],
2122
yearAndMonth: '${year}/${month}',

src/locales/in-ID.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const inID = mergeLocale(base, {
1616
confirm: 'OK',
1717
start: 'Mulai',
1818
end: 'Selesai',
19+
startAndEnd: 'Mulai/Selesai',
1920
today: 'Hari Ini',
2021
markItems: ['Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu', 'Minggu'],
2122
yearAndMonth: '${year} Tahun ${month} Bulan',

src/locales/ms-MY.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const msMY = mergeLocale(base, {
1616
'confirm': 'Ok',
1717
'start': 'Mula',
1818
'end': 'Tamat',
19+
'startAndEnd': 'Mula/Tamat',
1920
'today': 'Hari ini',
2021
'markItems': ['Satu', 'Dua', 'Tiga', 'Empat', 'Lima', 'Enam', 'Hari'],
2122
'yearAndMonth': 'Tahun${year} bulan ${month}',

src/locales/ru-RU.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const ruRU = mergeLocale(base, {
1616
confirm: 'Подтвердить',
1717
start: 'начало',
1818
end: 'конец',
19+
startAndEnd: 'начало/конец',
1920
today: 'сегодня',
2021
markItems: ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'],
2122
yearAndMonth: '${year}/${month}',

src/locales/sr-RS.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const srRS = mergeLocale(base, {
1616
confirm: 'Потврди',
1717
start: 'почетак',
1818
end: 'крај',
19+
startAndEnd: 'почетак/крај',
1920
today: 'данас',
2021
markItems: ['Пон', 'Уто', 'Сре', 'Чет', 'Пет', 'Суб', 'Нед'],
2122
yearAndMonth: '${year}/${month}',

0 commit comments

Comments
 (0)