diff --git a/src/date-picker/demos/enUS/index.demo-entry.md b/src/date-picker/demos/enUS/index.demo-entry.md
index a6ed4d22d19..d0db6cdab99 100644
--- a/src/date-picker/demos/enUS/index.demo-entry.md
+++ b/src/date-picker/demos/enUS/index.demo-entry.md
@@ -16,6 +16,7 @@ year.vue
yearrange.vue
quarter.vue
quarterrange.vue
+week.vue
size.vue
default-time.vue
disabled.vue
diff --git a/src/date-picker/demos/enUS/week.demo.vue b/src/date-picker/demos/enUS/week.demo.vue
new file mode 100644
index 00000000000..7cd30f438a4
--- /dev/null
+++ b/src/date-picker/demos/enUS/week.demo.vue
@@ -0,0 +1,20 @@
+
+# Week
+
+
+
+
+ {{ JSON.stringify(timestamp) }}
+
+
+
diff --git a/src/date-picker/demos/zhCN/index.demo-entry.md b/src/date-picker/demos/zhCN/index.demo-entry.md
index e34ac77e831..713c2eaeaf3 100644
--- a/src/date-picker/demos/zhCN/index.demo-entry.md
+++ b/src/date-picker/demos/zhCN/index.demo-entry.md
@@ -16,6 +16,7 @@ year.vue
yearrange.vue
quarter.vue
quarterrange.vue
+week.vue
size.vue
default-time.vue
disabled.vue
diff --git a/src/date-picker/demos/zhCN/week.demo.vue b/src/date-picker/demos/zhCN/week.demo.vue
new file mode 100644
index 00000000000..6aeab36dbb2
--- /dev/null
+++ b/src/date-picker/demos/zhCN/week.demo.vue
@@ -0,0 +1,20 @@
+
+# 周
+
+
+
+
+ {{ JSON.stringify(timestamp) }}
+
+
+
diff --git a/src/date-picker/src/DatePicker.tsx b/src/date-picker/src/DatePicker.tsx
index 986cfd6a211..146e4134727 100644
--- a/src/date-picker/src/DatePicker.tsx
+++ b/src/date-picker/src/DatePicker.tsx
@@ -218,6 +218,8 @@ export default defineComponent({
case 'quarter':
case 'quarterrange':
return localeRef.value.quarterFormat
+ case 'week':
+ return localeRef.value.weekFormat
}
})
const mergedValueFormatRef = computed(() => {
@@ -316,6 +318,8 @@ export default defineComponent({
return localeRef.value.yearPlaceholder
case 'quarter':
return localeRef.value.quarterPlaceholder
+ case 'week':
+ return localeRef.value.weekPlaceholder
default:
return ''
}
@@ -357,7 +361,8 @@ export default defineComponent({
if (actions !== undefined) return actions
const result = clearable ? ['clear'] : []
switch (type) {
- case 'date': {
+ case 'date':
+ case 'week': {
result.push('now')
return result
}
@@ -1030,7 +1035,9 @@ export default defineComponent({
type === 'quarterrange' ? (
) : (
- {$slots}
+
+ {$slots}
+
)
}
if (this.panel) {
diff --git a/src/date-picker/src/config.ts b/src/date-picker/src/config.ts
index 5ee404e5754..747d0858903 100644
--- a/src/date-picker/src/config.ts
+++ b/src/date-picker/src/config.ts
@@ -13,3 +13,4 @@ export type DatePickerType =
| 'monthrange'
| 'quarterrange'
| 'yearrange'
+ | 'week'
diff --git a/src/date-picker/src/panel/date.tsx b/src/date-picker/src/panel/date.tsx
index 95c4ca29938..e6a1ba024ff 100644
--- a/src/date-picker/src/panel/date.tsx
+++ b/src/date-picker/src/panel/date.tsx
@@ -1,4 +1,4 @@
-import { h, defineComponent, watchEffect } from 'vue'
+import { h, defineComponent, watchEffect, type PropType } from 'vue'
import {
BackwardIcon,
FastBackwardIcon,
@@ -19,7 +19,13 @@ import PanelHeader from './panelHeader'
*/
export default defineComponent({
name: 'DatePanel',
- props: useCalendarProps,
+ props: {
+ ...useCalendarProps,
+ type: {
+ type: String as PropType<'date' | 'week'>,
+ required: false
+ }
+ },
setup (props) {
if (__DEV__) {
watchEffect(() => {
@@ -31,7 +37,7 @@ export default defineComponent({
}
})
}
- return useCalendar(props, 'date')
+ return useCalendar(props, props.type ?? 'date')
},
render () {
const { mergedClsPrefix, mergedTheme, shortcuts, onRender, $slots } = this
@@ -109,12 +115,19 @@ export default defineComponent({
[`${mergedClsPrefix}-date-panel-date--excluded`]:
!dateItem.inCurrentMonth,
[`${mergedClsPrefix}-date-panel-date--disabled`]:
- this.mergedIsDateDisabled(dateItem.ts)
+ this.mergedIsDateDisabled(dateItem.ts),
+ [`${mergedClsPrefix}-date-panel-date--slightly-covered`]:
+ this.isSlightlyCovered(dateItem),
+ [`${mergedClsPrefix}-date-panel-date--heavily-covered`]:
+ dateItem.inHeavySpan
}
]}
onClick={() => {
this.handleDateClick(dateItem)
}}
+ onMouseenter={() => {
+ this.handleDateMouseEnter(dateItem)
+ }}
>
{dateItem.dateObject.date}
diff --git a/src/date-picker/src/panel/use-calendar.ts b/src/date-picker/src/panel/use-calendar.ts
index 58eb167ae81..82ed71767da 100644
--- a/src/date-picker/src/panel/use-calendar.ts
+++ b/src/date-picker/src/panel/use-calendar.ts
@@ -22,6 +22,7 @@ import {
startOfMonth,
startOfYear,
startOfQuarter,
+ startOfWeek,
setQuarter,
setYear,
setMonth
@@ -37,6 +38,7 @@ import {
quarterArray
} from '../utils'
import type {
+ FirstDayOfWeek,
IsSingleDateDisabled,
PanelChildComponentRefs,
Shortcuts
@@ -57,7 +59,7 @@ const useCalendarProps = {
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function useCalendar (
props: ExtractPropTypes,
- type: 'date' | 'datetime' | 'month' | 'year' | 'quarter'
+ type: 'date' | 'datetime' | 'month' | 'year' | 'quarter' | 'week'
) {
const panelCommon = usePanelCommon(props)
const {
@@ -106,7 +108,9 @@ function useCalendar (
calendarValueRef.value,
props.value,
nowRef.value,
- firstDayOfWeekRef.value ?? localeRef.value.firstDayOfWeek
+ firstDayOfWeekRef.value ?? localeRef.value.firstDayOfWeek,
+ false,
+ type === 'week'
)
})
const monthArrayRef = computed(() => {
@@ -175,11 +179,26 @@ function useCalendar (
}
}
)
+
function sanitizeValue (value: number): number {
if (type === 'datetime') return getTime(startOfSecond(value))
if (type === 'month') return getTime(startOfMonth(value))
if (type === 'year') return getTime(startOfYear(value))
if (type === 'quarter') return getTime(startOfQuarter(value))
+ if (type === 'week') {
+ // refer to makeWeekMatcher
+ const weekStartsOn = (((firstDayOfWeekRef.value ??
+ localeRef.value.firstDayOfWeek) +
+ 1) %
+ 7) as FirstDayOfWeek
+ console.log(firstDayOfWeekRef.value, localeRef.value.firstDayOfWeek)
+
+ return getTime(
+ startOfWeek(value, {
+ weekStartsOn
+ })
+ )
+ }
return getTime(startOfDay(value))
}
function mergedIsDateDisabled (ts: number): boolean {
@@ -261,6 +280,22 @@ function useCalendar (
justifyColumnsScrollState(now)
}
}
+ const hoveredWeekRef = ref(null)
+ function handleDateMouseEnter (
+ dateItem: DateItem | MonthItem | YearItem | QuarterItem
+ ): void {
+ if (dateItem.type === 'date' && type === 'week') {
+ hoveredWeekRef.value = sanitizeValue(getTime(dateItem.ts))
+ }
+ }
+ function isSlightlyCovered (
+ dateItem: DateItem | MonthItem | YearItem | QuarterItem
+ ): boolean {
+ if (dateItem.type === 'date' && type === 'week') {
+ return sanitizeValue(getTime(dateItem.ts)) === hoveredWeekRef.value
+ }
+ return false
+ }
function handleDateClick (
dateItem: DateItem | MonthItem | YearItem | QuarterItem
): void {
@@ -293,10 +328,11 @@ function useCalendar (
)
panelCommon.doUpdateValue(
sanitizeValue(newValue),
- props.panel || type === 'date' || type === 'year'
+ props.panel || type === 'date' || type === 'week' || type === 'year'
)
switch (type) {
case 'date':
+ case 'week':
panelCommon.doClose()
break
case 'year':
@@ -464,6 +500,8 @@ function useCalendar (
handleDateClick,
handleDateInputBlur,
handleDateInput,
+ handleDateMouseEnter,
+ isSlightlyCovered,
handleTimePickerChange,
clearSelectedDateTime,
virtualListContainer,
diff --git a/src/date-picker/src/styles/index.cssr.ts b/src/date-picker/src/styles/index.cssr.ts
index afd0c661ad8..f29642f14a8 100644
--- a/src/date-picker/src/styles/index.cssr.ts
+++ b/src/date-picker/src/styles/index.cssr.ts
@@ -341,9 +341,13 @@ export default c([
`),
cNotM('disabled', [
cNotM('selected', [
- c('&:hover', {
- backgroundColor: 'var(--n-item-color-hover)'
- })
+ cNotM('slightly-covered', [
+ cNotM('heavily-covered', [
+ c('&:hover', {
+ backgroundColor: 'var(--n-item-color-hover)'
+ })
+ ])
+ ])
])
]),
cM('current', [
@@ -371,6 +375,7 @@ export default c([
border-radius: inherit;
transition: background-color .3s var(--n-bezier);
`),
+
cM('covered, start, end', [
cNotM('excluded', [
c('&::before', `
@@ -439,6 +444,49 @@ export default c([
backgroundColor: 'var(--n-item-color-disabled)'
})
])
+ ]),
+ cM('slightly-covered', [
+ c('&::before', `
+ content: "";
+ z-index: -2;
+ position: absolute;
+ left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);
+ right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);
+ top: 0;
+ bottom: 0;
+ background-color: var(--n-item-color-included);
+ `),
+ c('&:nth-child(7n + 1)::before', {
+ borderTopLeftRadius: 'var(--n-item-border-radius)',
+ borderBottomLeftRadius: 'var(--n-item-border-radius)'
+ }),
+ c('&:nth-child(7n + 7)::before', {
+ borderTopRightRadius: 'var(--n-item-border-radius)',
+ borderBottomRightRadius: 'var(--n-item-border-radius)'
+ })
+ ]),
+ cM('heavily-covered', [
+ c('&', `
+ color: var(--n-item-text-color-active)
+ `),
+ c('&::before', `
+ content: "";
+ z-index: -2;
+ position: absolute;
+ left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);
+ right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);
+ top: 0;
+ bottom: 0;
+ background-color: var(--n-item-color-active);
+ `),
+ c('&:nth-child(7n + 1)::before', {
+ borderTopLeftRadius: 'var(--n-item-border-radius)',
+ borderBottomLeftRadius: 'var(--n-item-border-radius)'
+ }),
+ c('&:nth-child(7n + 7)::before', {
+ borderTopRightRadius: 'var(--n-item-border-radius)',
+ borderBottomRightRadius: 'var(--n-item-border-radius)'
+ })
])
])
]),
diff --git a/src/date-picker/src/utils.ts b/src/date-picker/src/utils.ts
index 7b71ca7b612..3235101ed73 100644
--- a/src/date-picker/src/utils.ts
+++ b/src/date-picker/src/utils.ts
@@ -17,11 +17,12 @@ import {
format,
startOfYear,
getQuarter,
- isSameQuarter
+ isSameQuarter,
+ isSameWeek
} from 'date-fns/esm'
import type { NDateLocale } from '../../locales'
import { START_YEAR } from './config'
-import type { Value } from './interface'
+import type { FirstDayOfWeek, Value } from './interface'
function getDerivedTimeFromKeyboardEvent (
prevValue: number | null,
@@ -49,13 +50,24 @@ const matcherMap = {
quarter: isSameQuarter
} as const
+function makeWeekMatcher (firstDayOfWeek: FirstDayOfWeek) {
+ return (sourceTime: number, patternTime: number | Date) => {
+ // date-fns: 0 - Sunday
+ // naive-ui: 0 - Monday
+ const weekStartsOn = ((firstDayOfWeek + 1) % 7) as FirstDayOfWeek
+ return isSameWeek(sourceTime, patternTime, { weekStartsOn })
+ }
+}
+
function matchDate (
sourceTime: number,
patternTime: number | Date,
- type: 'date' | 'month' | 'year' | 'quarter'
+ type: 'date' | 'month' | 'year' | 'quarter' | 'week',
+ firstDayOfWeek: FirstDayOfWeek = 0
): boolean {
- const matcher = matcherMap[type]
- return matcher(sourceTime, patternTime)
+ const matcher =
+ type === 'week' ? makeWeekMatcher(firstDayOfWeek) : matcherMap[type]
+ return matcher(sourceTime, patternTime)
}
export interface DateItem {
@@ -71,6 +83,7 @@ export interface DateItem {
startOfSpan: boolean
endOfSpan: boolean
selected: boolean
+ inHeavySpan: boolean
ts: number
}
@@ -106,6 +119,21 @@ export interface QuarterItem {
ts: number
}
+function dateOrWeekItem (
+ time: number,
+ monthTs: number,
+ valueTs: number | [number, number] | null,
+ currentTs: number,
+ mode: 'date' | 'week',
+ firstDayOfWeek: FirstDayOfWeek
+): DateItem {
+ if (mode === 'date') {
+ return dateItem(time, monthTs, valueTs, currentTs)
+ } else {
+ return weekItem(time, monthTs, valueTs, currentTs, firstDayOfWeek)
+ }
+}
+
// date item's valueTs can be a tuple since two date may show in one panel, so
// any matched value would make it shown as selected
function dateItem (
@@ -140,6 +168,7 @@ function dateItem (
inCurrentMonth: isSameMonth(time, monthTs),
isCurrentDate: matchDate(currentTs, time, 'date'),
inSpan,
+ inHeavySpan: false,
startOfSpan,
endOfSpan,
selected,
@@ -147,6 +176,47 @@ function dateItem (
}
}
+function weekItem (
+ time: number,
+ monthTs: number,
+ valueTs: number | [number, number] | null,
+ currentTs: number,
+ firstDayOfWeek: FirstDayOfWeek
+): DateItem {
+ let inSpan = false
+ let startOfSpan = false
+ let endOfSpan = false
+ if (Array.isArray(valueTs)) {
+ if (valueTs[0] < time && time < valueTs[1]) {
+ inSpan = true
+ }
+ if (matchDate(valueTs[0], time, 'week', firstDayOfWeek)) startOfSpan = true
+ if (matchDate(valueTs[1], time, 'week', firstDayOfWeek)) endOfSpan = true
+ }
+ const inHeavySpan =
+ valueTs !== null &&
+ (Array.isArray(valueTs)
+ ? matchDate(valueTs[0], time, 'week', firstDayOfWeek) ||
+ matchDate(valueTs[1], time, 'week', firstDayOfWeek)
+ : matchDate(valueTs, time, 'week', firstDayOfWeek))
+ return {
+ type: 'date',
+ dateObject: {
+ date: getDate(time),
+ month: getMonth(time),
+ year: getYear(time)
+ },
+ inCurrentMonth: isSameMonth(time, monthTs),
+ isCurrentDate: matchDate(currentTs, time, 'date'),
+ inSpan,
+ startOfSpan,
+ endOfSpan,
+ selected: false,
+ inHeavySpan,
+ ts: getTime(time)
+ }
+}
+
function monthItem (
monthTs: number,
valueTs: number | null,
@@ -206,8 +276,10 @@ function dateArray (
valueTs: number | [number, number] | null,
currentTs: number,
startDay: 0 | 1 | 2 | 3 | 4 | 5 | 6,
- strip: boolean = false
+ strip: boolean = false,
+ weekMode: boolean = false
): DateItem[] {
+ const granularity = weekMode ? 'week' : 'date'
const displayMonth = getMonth(monthTs)
// First day of current month
let displayMonthIterator = getTime(startOfMonth(monthTs))
@@ -220,14 +292,28 @@ function dateArray (
protectLastMonthDateIsShownFlag
) {
calendarDays.unshift(
- dateItem(lastMonthIterator, monthTs, valueTs, currentTs)
+ dateOrWeekItem(
+ lastMonthIterator,
+ monthTs,
+ valueTs,
+ currentTs,
+ granularity,
+ startDay
+ )
)
lastMonthIterator = getTime(addDays(lastMonthIterator, -1))
protectLastMonthDateIsShownFlag = false
}
while (getMonth(displayMonthIterator) === displayMonth) {
calendarDays.push(
- dateItem(displayMonthIterator, monthTs, valueTs, currentTs)
+ dateOrWeekItem(
+ displayMonthIterator,
+ monthTs,
+ valueTs,
+ currentTs,
+ granularity,
+ startDay
+ )
)
displayMonthIterator = getTime(addDays(displayMonthIterator, 1))
}
@@ -240,7 +326,14 @@ function dateArray (
: 42
while (calendarDays.length < endIndex) {
calendarDays.push(
- dateItem(displayMonthIterator, monthTs, valueTs, currentTs)
+ dateOrWeekItem(
+ displayMonthIterator,
+ monthTs,
+ valueTs,
+ currentTs,
+ granularity,
+ startDay
+ )
)
displayMonthIterator = getTime(addDays(displayMonthIterator, 1))
}
diff --git a/src/date-picker/styles/_common.ts b/src/date-picker/styles/_common.ts
index e1082f138ed..b24a986ac25 100644
--- a/src/date-picker/styles/_common.ts
+++ b/src/date-picker/styles/_common.ts
@@ -23,6 +23,7 @@ export default {
calendarLeftPaddingMonthrange: '0',
calendarLeftPaddingQuarterrange: '0',
calendarLeftPaddingYearrange: '0',
+ calendarLeftPaddingWeek: '0',
calendarRightPaddingDate: '6px 12px 4px 12px',
calendarRightPaddingDatetime: '4px 12px',
calendarRightPaddingDaterange: '6px 12px 4px 12px',
@@ -32,5 +33,6 @@ export default {
calendarRightPaddingQuarter: '0',
calendarRightPaddingMonthrange: '0',
calendarRightPaddingQuarterrange: '0',
- calendarRightPaddingYearrange: '0'
+ calendarRightPaddingYearrange: '0',
+ calendarRightPaddingWeek: '0'
}
diff --git a/src/locales/common/arDZ.ts b/src/locales/common/arDZ.ts
index 214e0169fa7..313d738469a 100644
--- a/src/locales/common/arDZ.ts
+++ b/src/locales/common/arDZ.ts
@@ -31,6 +31,7 @@ const arDZ: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'مسح',
now: 'الآن',
confirm: 'تأكيد',
@@ -41,6 +42,7 @@ const arDZ: NLocale = {
monthPlaceholder: 'إختيار الشهر',
yearPlaceholder: 'إختيار السنة',
quarterPlaceholder: 'إختيار الربع',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'تاريخ البدء',
endDatePlaceholder: 'تاريخ الإنتهاء',
startDatetimePlaceholder: 'تاريخ ووقت البدء',
diff --git a/src/locales/common/deDE.ts b/src/locales/common/deDE.ts
index 9d3d6833596..4ab7661b9d7 100644
--- a/src/locales/common/deDE.ts
+++ b/src/locales/common/deDE.ts
@@ -31,6 +31,7 @@ const deDE: NLocale = {
dateFormat: 'dd.MM.yyyy',
dateTimeFormat: 'dd.MM.yyyy HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Löschen',
now: 'Jetzt',
confirm: 'Bestätigen',
@@ -41,6 +42,7 @@ const deDE: NLocale = {
monthPlaceholder: 'Monat auswählen',
yearPlaceholder: 'Jahr auswählen',
quarterPlaceholder: 'Quartal auswählen',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Anfangsdatum',
endDatePlaceholder: 'Enddatum',
startDatetimePlaceholder: 'Anfangsdatum und Uhrzeit',
diff --git a/src/locales/common/enGB.ts b/src/locales/common/enGB.ts
index 25a0c2d4853..57fb7062bee 100644
--- a/src/locales/common/enGB.ts
+++ b/src/locales/common/enGB.ts
@@ -31,6 +31,7 @@ const enGB: NLocale = {
dateFormat: 'yyyy/MM/dd',
dateTimeFormat: 'yyyy/MM/dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Clear',
now: 'Now',
confirm: 'Confirm',
@@ -41,6 +42,7 @@ const enGB: NLocale = {
monthPlaceholder: 'Select Month',
yearPlaceholder: 'Select Year',
quarterPlaceholder: 'Select Quarter',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Start Date',
endDatePlaceholder: 'End Date',
startDatetimePlaceholder: 'Start Date and Time',
diff --git a/src/locales/common/enUS.ts b/src/locales/common/enUS.ts
index b057c1800c1..f74e32ed5af 100644
--- a/src/locales/common/enUS.ts
+++ b/src/locales/common/enUS.ts
@@ -29,6 +29,7 @@ const enUS = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Clear',
now: 'Now',
confirm: 'Confirm',
@@ -39,6 +40,7 @@ const enUS = {
monthPlaceholder: 'Select Month',
yearPlaceholder: 'Select Year',
quarterPlaceholder: 'Select Quarter',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Start Date',
endDatePlaceholder: 'End Date',
startDatetimePlaceholder: 'Start Date and Time',
diff --git a/src/locales/common/eo.ts b/src/locales/common/eo.ts
index 7e8089a1ebb..5b394a470da 100644
--- a/src/locales/common/eo.ts
+++ b/src/locales/common/eo.ts
@@ -31,6 +31,7 @@ const eo: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Malplenigi',
now: 'Nun',
confirm: 'Konfirmi',
@@ -41,6 +42,7 @@ const eo: NLocale = {
monthPlaceholder: 'Elekti monaton',
yearPlaceholder: 'Elekti jaron',
quarterPlaceholder: 'Elekti jarkvaronon',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Komenca dato',
endDatePlaceholder: 'Fina dato',
startDatetimePlaceholder: 'Komencaj dato kaj tempo',
diff --git a/src/locales/common/esAR.ts b/src/locales/common/esAR.ts
index 65cbcab72a7..352cec1e6e8 100644
--- a/src/locales/common/esAR.ts
+++ b/src/locales/common/esAR.ts
@@ -31,6 +31,7 @@ const esAR: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Borrar',
now: 'Ahora',
confirm: 'Confirmar',
@@ -41,6 +42,7 @@ const esAR: NLocale = {
monthPlaceholder: 'Seleccionar mes',
yearPlaceholder: 'Seleccionar año',
quarterPlaceholder: 'Seleccionar Trimestre',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Fecha de inicio',
endDatePlaceholder: 'Fecha final',
startDatetimePlaceholder: 'Fecha y hora de inicio',
diff --git a/src/locales/common/faIR.ts b/src/locales/common/faIR.ts
index 93c7a02ac5a..d189c19c4df 100644
--- a/src/locales/common/faIR.ts
+++ b/src/locales/common/faIR.ts
@@ -31,6 +31,7 @@ const faIR: NLocale = {
dateFormat: 'yyyy/MM/dd',
dateTimeFormat: 'yyyy/MM/dd HH:mm:ss',
quarterFormat: 'سه ماهه yyyy',
+ weekFormat: 'yyyy-w',
clear: 'پاک کردن',
now: 'اکنون',
confirm: 'تأیید',
@@ -41,6 +42,7 @@ const faIR: NLocale = {
monthPlaceholder: 'انتخاب ماه',
yearPlaceholder: 'انتخاب سال',
quarterPlaceholder: 'انتخاب سهماهه',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'تاریخ شروع',
endDatePlaceholder: 'تاریخ پایان',
startDatetimePlaceholder: 'زمان شروع',
diff --git a/src/locales/common/frFR.ts b/src/locales/common/frFR.ts
index af2ecea1db8..bbcbd5d5abe 100644
--- a/src/locales/common/frFR.ts
+++ b/src/locales/common/frFR.ts
@@ -31,6 +31,7 @@ const frFR: NLocale = {
dateFormat: 'dd/MM/yyyy',
dateTimeFormat: 'dd/MM/yyyy HH:mm:ss',
quarterFormat: 'qqq yyyy',
+ weekFormat: 'yyyy-w',
clear: 'Effacer',
now: 'Maintenant',
confirm: 'Confirmer',
@@ -41,6 +42,7 @@ const frFR: NLocale = {
monthPlaceholder: 'Sélectionner le mois',
yearPlaceholder: "Sélectionner l'année",
quarterPlaceholder: 'Sélectionner le trimestre',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Date de début',
endDatePlaceholder: 'Date de fin',
startDatetimePlaceholder: 'Date et heure de début',
diff --git a/src/locales/common/idID.ts b/src/locales/common/idID.ts
index 736f1ed0064..2cfe8c2592a 100644
--- a/src/locales/common/idID.ts
+++ b/src/locales/common/idID.ts
@@ -31,6 +31,7 @@ const idID: NLocale = {
dateFormat: 'dd-MM-yyyy',
dateTimeFormat: 'dd-MM-yyyy HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Bersihkan',
now: 'Sekarang',
confirm: 'Setuju',
@@ -42,6 +43,7 @@ const idID: NLocale = {
// FIXME: translation needed
yearPlaceholder: 'Pilih tahun',
quarterPlaceholder: 'Pilih perempat tahun',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Tanggal Mulai',
endDatePlaceholder: 'Tanggal Selesai',
startDatetimePlaceholder: 'Tanggal dan Waktu Mulai',
diff --git a/src/locales/common/itIT.ts b/src/locales/common/itIT.ts
index 7bf7b48d809..199736e405a 100644
--- a/src/locales/common/itIT.ts
+++ b/src/locales/common/itIT.ts
@@ -31,6 +31,7 @@ const itIT: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Cancella',
now: 'Adesso',
confirm: 'Conferma',
@@ -41,6 +42,7 @@ const itIT: NLocale = {
monthPlaceholder: 'Seleziona mese',
yearPlaceholder: 'Seleziona anno',
quarterPlaceholder: 'Seleziona trimestre',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Data inizio',
endDatePlaceholder: 'Data fine',
startDatetimePlaceholder: 'Data e ora di inizio',
diff --git a/src/locales/common/jaJP.ts b/src/locales/common/jaJP.ts
index ae65c5f910d..2804dcea972 100644
--- a/src/locales/common/jaJP.ts
+++ b/src/locales/common/jaJP.ts
@@ -31,6 +31,7 @@ const jaJP: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'クリア',
now: '現在',
confirm: 'OK',
@@ -41,6 +42,7 @@ const jaJP: NLocale = {
monthPlaceholder: '月を選択',
yearPlaceholder: '年を選択',
quarterPlaceholder: '四半期を選択',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: '開始日',
endDatePlaceholder: '終了日',
startDatetimePlaceholder: '開始時間',
diff --git a/src/locales/common/koKR.ts b/src/locales/common/koKR.ts
index f9b87afd9d7..cd6ad26d61c 100644
--- a/src/locales/common/koKR.ts
+++ b/src/locales/common/koKR.ts
@@ -31,6 +31,7 @@ const koKR: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: '지우기',
now: '현재',
confirm: '확인',
@@ -41,6 +42,7 @@ const koKR: NLocale = {
monthPlaceholder: '월 선택',
yearPlaceholder: '년 선택',
quarterPlaceholder: '분기 선택',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: '시작 날짜',
endDatePlaceholder: '종료 날짜',
startDatetimePlaceholder: '시작 날짜 및 시간',
diff --git a/src/locales/common/nbNO.ts b/src/locales/common/nbNO.ts
index 2e6fd1be51f..ebf33b24747 100644
--- a/src/locales/common/nbNO.ts
+++ b/src/locales/common/nbNO.ts
@@ -31,6 +31,7 @@ const nbNO: NLocale = {
dateFormat: 'dd.MM.yyyy',
dateTimeFormat: 'dd.MM.yyyy HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Tøm',
now: 'Nå',
confirm: 'Bekreft',
@@ -42,6 +43,7 @@ const nbNO: NLocale = {
// FIXME: translation needed
yearPlaceholder: 'Select Year',
quarterPlaceholder: 'Select Quarter',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Startdato',
endDatePlaceholder: 'Sluttdato',
startDatetimePlaceholder: 'Startdato og -tid',
diff --git a/src/locales/common/nlNL.ts b/src/locales/common/nlNL.ts
index b1894a95744..935243dffab 100644
--- a/src/locales/common/nlNL.ts
+++ b/src/locales/common/nlNL.ts
@@ -31,6 +31,7 @@ const nlNL: NLocale = {
dateFormat: 'dd/MM/yyyy',
dateTimeFormat: 'dd/MM/yyyy HH:mm:ss',
quarterFormat: 'qqq yyyy',
+ weekFormat: 'yyyy-w',
clear: 'Wis',
now: 'Nu',
confirm: 'Bevestig',
@@ -41,6 +42,7 @@ const nlNL: NLocale = {
monthPlaceholder: 'Selecteer Maand',
yearPlaceholder: 'Selecteer Jaar',
quarterPlaceholder: 'Selecteer Kwartaal',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Begindatum',
endDatePlaceholder: 'Einddatum',
startDatetimePlaceholder: 'Begindatum en Uur',
diff --git a/src/locales/common/plPL.ts b/src/locales/common/plPL.ts
index 9f7e361c028..0cda15ac7ab 100644
--- a/src/locales/common/plPL.ts
+++ b/src/locales/common/plPL.ts
@@ -31,6 +31,7 @@ const plPL: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Wyczyść',
now: 'Teraz',
confirm: 'Potwierdź',
@@ -41,6 +42,7 @@ const plPL: NLocale = {
monthPlaceholder: 'Wybierz miesiąc',
yearPlaceholder: 'Wybierz rok',
quarterPlaceholder: 'Wybierz kwartał',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Data rozpoczęcia',
endDatePlaceholder: 'Data zakończenia',
startDatetimePlaceholder: 'Data i godzina rozpoczęcia',
diff --git a/src/locales/common/ptBR.ts b/src/locales/common/ptBR.ts
index f99a6e4bd50..b2fd372c46c 100644
--- a/src/locales/common/ptBR.ts
+++ b/src/locales/common/ptBR.ts
@@ -31,6 +31,7 @@ const ptBR: NLocale = {
dateFormat: 'dd/MM/yyyy',
dateTimeFormat: 'dd/MM/yyyy HH:mm:ss',
quarterFormat: 'yyyy/qqq',
+ weekFormat: 'yyyy-w',
clear: 'Limpar',
now: 'Agora',
confirm: 'Confirmar',
@@ -41,6 +42,7 @@ const ptBR: NLocale = {
monthPlaceholder: 'Selecione o mês',
yearPlaceholder: 'Selecione o ano',
quarterPlaceholder: 'Selecione o trimestre',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Selecione a data de início',
endDatePlaceholder: 'Selecione a data de término',
startDatetimePlaceholder: 'Selecione a data e hora de início',
diff --git a/src/locales/common/ruRU.ts b/src/locales/common/ruRU.ts
index 9f67d497888..ad47c27570a 100644
--- a/src/locales/common/ruRU.ts
+++ b/src/locales/common/ruRU.ts
@@ -31,6 +31,7 @@ const ruRu: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Очистить',
now: 'Сейчас',
confirm: 'Подтвердить',
@@ -42,6 +43,7 @@ const ruRu: NLocale = {
// FIXME: translation needed
yearPlaceholder: 'Select Year',
quarterPlaceholder: 'Select Quarter',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Дата начала',
endDatePlaceholder: 'Дата окончания',
startDatetimePlaceholder: 'Дата и время начала',
diff --git a/src/locales/common/skSK.ts b/src/locales/common/skSK.ts
index ae853dcf1ad..d527f2aabf4 100644
--- a/src/locales/common/skSK.ts
+++ b/src/locales/common/skSK.ts
@@ -31,6 +31,7 @@ const skSK: NLocale = {
dateFormat: 'd-M-yyyy',
dateTimeFormat: 'd-M-yyyy HH:mm:ss',
quarterFormat: 'qqq-yyyy',
+ weekFormat: 'yyyy-w',
clear: 'Vyčistiť',
now: 'Teraz',
confirm: 'Potvrdiť',
@@ -41,6 +42,7 @@ const skSK: NLocale = {
monthPlaceholder: 'Vyberte mesiac',
yearPlaceholder: 'Vyberte rok',
quarterPlaceholder: 'Vyberte štvrťrok',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Dátum začiatku',
endDatePlaceholder: 'Dátum ukončenia',
startDatetimePlaceholder: 'Dátum a čas začiatku',
diff --git a/src/locales/common/svSE.ts b/src/locales/common/svSE.ts
index db8b9bbde07..e0ca0994dd5 100644
--- a/src/locales/common/svSE.ts
+++ b/src/locales/common/svSE.ts
@@ -31,6 +31,7 @@ const svSE: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Rensa',
now: 'Nu',
confirm: 'Bekräfta',
@@ -41,6 +42,7 @@ const svSE: NLocale = {
monthPlaceholder: 'Välj månad',
yearPlaceholder: 'Välj år',
quarterPlaceholder: 'Välj kvartal',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Startdatum',
endDatePlaceholder: 'Slutdatum',
startDatetimePlaceholder: 'Startdatum och -tid',
diff --git a/src/locales/common/thTH.ts b/src/locales/common/thTH.ts
index 4d5f54ed574..394e484de29 100644
--- a/src/locales/common/thTH.ts
+++ b/src/locales/common/thTH.ts
@@ -31,6 +31,7 @@ const thTH: NLocale = {
dateFormat: 'dd/MMMM/yyyy',
dateTimeFormat: 'dd/MMMM/yyyy HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'ล้าง',
now: 'วันนี้',
confirm: 'ยืนยัน',
@@ -41,6 +42,7 @@ const thTH: NLocale = {
monthPlaceholder: 'เดือน',
yearPlaceholder: 'ปี',
quarterPlaceholder: 'ไตรมาส',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'วันที่เริ่มต้น',
endDatePlaceholder: 'วันที่สิ้นสุด',
startDatetimePlaceholder: 'วันที่เริ่มต้นและสิ้นสุด',
diff --git a/src/locales/common/trTR.ts b/src/locales/common/trTR.ts
index e24dc2520b8..3b7b61c84c4 100644
--- a/src/locales/common/trTR.ts
+++ b/src/locales/common/trTR.ts
@@ -30,6 +30,7 @@ const trTR: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Temizle',
now: 'Şimdi',
confirm: 'Onayla',
@@ -40,6 +41,7 @@ const trTR: NLocale = {
monthPlaceholder: 'Ay Seçin',
yearPlaceholder: 'Yıl Seçin',
quarterPlaceholder: 'Mevsim Seçin',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Başlangıç Tarihi',
endDatePlaceholder: 'Bitiş Tarihi',
startDatetimePlaceholder: 'Başlangıç Tarih ve Saati',
diff --git a/src/locales/common/ukUA.ts b/src/locales/common/ukUA.ts
index e6d28a9bcfc..17c0d1ebd46 100644
--- a/src/locales/common/ukUA.ts
+++ b/src/locales/common/ukUA.ts
@@ -31,6 +31,7 @@ const ukUA: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: 'Стерти',
now: 'Зараз',
confirm: 'Підтвердити',
@@ -41,6 +42,7 @@ const ukUA: NLocale = {
monthPlaceholder: 'Оберіть місяць',
yearPlaceholder: 'Оберіть рік',
quarterPlaceholder: 'Оберіть квартал',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Дата початку',
endDatePlaceholder: 'Дата завершення',
startDatetimePlaceholder: 'Дата і час початку',
diff --git a/src/locales/common/viVN.ts b/src/locales/common/viVN.ts
index 67a97c3fd2b..423cbd1858e 100644
--- a/src/locales/common/viVN.ts
+++ b/src/locales/common/viVN.ts
@@ -31,6 +31,7 @@ const viVN: NLocale = {
dateFormat: 'dd-MM-yyyy',
dateTimeFormat: 'HH:mm:ss dd-MM-yyyy',
quarterFormat: 'qqq-yyyy',
+ weekFormat: 'yyyy-w',
clear: 'Xóa',
now: 'Hôm nay',
confirm: 'Xác nhận',
@@ -41,6 +42,7 @@ const viVN: NLocale = {
monthPlaceholder: 'Chọn tháng',
yearPlaceholder: 'Chọn năm',
quarterPlaceholder: 'Chọn quý',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: 'Ngày bắt đầu',
endDatePlaceholder: 'Ngày kết thúc',
startDatetimePlaceholder: 'Thời gian bắt đầu',
diff --git a/src/locales/common/zhCN.ts b/src/locales/common/zhCN.ts
index 6cd92335f62..835941c42de 100644
--- a/src/locales/common/zhCN.ts
+++ b/src/locales/common/zhCN.ts
@@ -31,6 +31,7 @@ const zhCN: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w周',
clear: '清除',
now: '此刻',
confirm: '确认',
@@ -41,6 +42,7 @@ const zhCN: NLocale = {
monthPlaceholder: '选择月份',
yearPlaceholder: '选择年份',
quarterPlaceholder: '选择季度',
+ weekPlaceholder: '选择周',
startDatePlaceholder: '开始日期',
endDatePlaceholder: '结束日期',
startDatetimePlaceholder: '开始日期时间',
diff --git a/src/locales/common/zhTW.ts b/src/locales/common/zhTW.ts
index 0b5e7922dd8..e6c8e80feab 100644
--- a/src/locales/common/zhTW.ts
+++ b/src/locales/common/zhTW.ts
@@ -31,6 +31,7 @@ const zhTW: NLocale = {
dateFormat: 'yyyy-MM-dd',
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
quarterFormat: 'yyyy-qqq',
+ weekFormat: 'yyyy-w',
clear: '清除',
now: '現在',
confirm: '確定',
@@ -41,6 +42,7 @@ const zhTW: NLocale = {
monthPlaceholder: '選擇月份',
yearPlaceholder: '選擇年份',
quarterPlaceholder: '選擇季度',
+ weekPlaceholder: 'Select Week',
startDatePlaceholder: '開始日期',
endDatePlaceholder: '結束日期',
startDatetimePlaceholder: '開始日期時間',