Skip to content

Commit

Permalink
fix(date-picker): should limit week value length
Browse files Browse the repository at this point in the history
  • Loading branch information
qmhc committed Apr 3, 2024
1 parent 2a4810a commit 6fee8b2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions components/date-picker/date-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,17 @@ const calendarValue = computed(() => {
? getStringValue('start')
: ''
})
const weekDays = computed(() => {
return [
props.locale.week7,
props.locale.week1,
props.locale.week2,
props.locale.week3,
props.locale.week4,
props.locale.week5,
props.locale.week6
].map(week => week.slice(0, 2))
})
watch(
calendarYear,
Expand Down Expand Up @@ -604,6 +615,7 @@ function refreshCalendar(valueType: 'start' | 'end') {
:min="min"
:max="max"
:week-start="weekStart"
:week-days="weekDays"
@select="handleSelectDate"
@hover="handleHoverDate"
></CalendarPanel>
Expand Down

0 comments on commit 6fee8b2

Please sign in to comment.