diff --git a/examples/docs/en-US/calendar.md b/examples/docs/en-US/calendar.md index dfe84eaa1..e94ff119a 100644 --- a/examples/docs/en-US/calendar.md +++ b/examples/docs/en-US/calendar.md @@ -52,10 +52,6 @@ Display date. ``` ::: -:::tip -The `first-day-of-week` attribute is not supported when using custom ranges. -::: - ### Attributes | Attribute | Description | Type | Accepted Values | Default | |-----------------|------------------- |---------- |---------------------- |--------- | diff --git a/examples/docs/es/calendar.md b/examples/docs/es/calendar.md index 22dff71c1..d9b1834a6 100644 --- a/examples/docs/es/calendar.md +++ b/examples/docs/es/calendar.md @@ -53,10 +53,6 @@ Muestra fechas. ``` ::: -:::tip -The `first-day-of-week` attribute is not supported when using custom ranges. -::: - ### Atributos | Atributo | Descripción | Tipo | Valores aceptados | Por defecto | |-----------------|------------------- |---------- |---------------------- |------------ | diff --git a/examples/docs/fr-FR/calendar.md b/examples/docs/fr-FR/calendar.md index 6c9653ce7..a32a20153 100644 --- a/examples/docs/fr-FR/calendar.md +++ b/examples/docs/fr-FR/calendar.md @@ -52,10 +52,6 @@ Affiche un calendrier. ``` ::: -:::tip -The `first-day-of-week` attribute is not supported when using custom ranges. -::: - ### Attributs | Attribut | Description | Type | Valeurs acceptées | Défaut | diff --git a/examples/docs/fr-FR/form.md b/examples/docs/fr-FR/form.md index 62a3a2865..7f6bec4b6 100644 --- a/examples/docs/fr-FR/form.md +++ b/examples/docs/fr-FR/form.md @@ -394,7 +394,7 @@ Les callback de validations personnalisées doivent être appelées. Un usage pl prop="email" label="Email" :rules="[ - { required: true, message: 'Veuillez entrer l\'adresse e-mail', trigger: 'blur' }, + { required: true, message: 'Veuillez entrer l'adresse e-mail', trigger: 'blur' }, { type: 'email', message: 'Veuillez entrer une adresse e-mail valide', trigger: ['blur', 'change'] } ]" > diff --git a/examples/docs/zh-CN/calendar.md b/examples/docs/zh-CN/calendar.md index 4a806de06..b7b36e9d4 100644 --- a/examples/docs/zh-CN/calendar.md +++ b/examples/docs/zh-CN/calendar.md @@ -52,10 +52,6 @@ ``` ::: -:::tip -使用自定义范围时,不支持 first-day-of-week 属性。 -::: - ### Attributes | 参数 | 说明 | 类型 | 可选值 | 默认值 | |-----------------|-------------- |---------- |------------ |-------- | diff --git a/packages/calendar/src/date-table.vue b/packages/calendar/src/date-table.vue index 39c0568cc..14f1d9c76 100644 --- a/packages/calendar/src/date-table.vue +++ b/packages/calendar/src/date-table.vue @@ -141,10 +141,7 @@ export default { }, weekDays() { - let start = this.firstDayOfWeek; - if (this.isInRange) { - start = 1; - } + const start = this.firstDayOfWeek; if (typeof start !== 'number' || start === 0) { return WEEK_DAYS.slice(); } else { diff --git a/test/unit/specs/calendar.spec.js b/test/unit/specs/calendar.spec.js index 81c86cf65..b869447d2 100644 --- a/test/unit/specs/calendar.spec.js +++ b/test/unit/specs/calendar.spec.js @@ -85,24 +85,5 @@ describe('Calendar', () => { expect(firstRow.firstElementChild.innerText).to.be.equal('31'); expect(firstRow.lastElementChild.innerText).to.be.equal('6'); }); - - it('if range is specified, firstDayOfWeek will be ignored', async() => { - vm = createVue({ - template: ` - - `, - data() { - return { - value: new Date('2019-03-04') - }; - } - }, true); - const head = vm.$el.querySelector('.el-calendar-table thead'); - expect(head.firstElementChild.innerText).to.be.equal('一'); - expect(head.lastElementChild.innerText).to.be.equal('日'); - const firstRow = vm.$el.querySelector('.el-calendar-table__row'); - expect(firstRow.firstElementChild.innerText).to.be.equal('4'); - expect(firstRow.lastElementChild.innerText).to.be.equal('10'); - }); });