Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
911ce3d3
Commit
911ce3d3
authored
Jul 02, 2019
by
Zhi Cun
Committed by
hetech
Jul 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Calendar: first-day-of-week is not supported when using custom ranges (#16235)" (#16353)
parent
1bc3e5aa
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2 additions
and
40 deletions
+2
-40
examples/docs/en-US/calendar.md
examples/docs/en-US/calendar.md
+0
-4
examples/docs/es/calendar.md
examples/docs/es/calendar.md
+0
-4
examples/docs/fr-FR/calendar.md
examples/docs/fr-FR/calendar.md
+0
-4
examples/docs/fr-FR/form.md
examples/docs/fr-FR/form.md
+1
-1
examples/docs/zh-CN/calendar.md
examples/docs/zh-CN/calendar.md
+0
-4
packages/calendar/src/date-table.vue
packages/calendar/src/date-table.vue
+1
-4
test/unit/specs/calendar.spec.js
test/unit/specs/calendar.spec.js
+0
-19
No files found.
examples/docs/en-US/calendar.md
View file @
911ce3d3
...
...
@@ -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 |
|-----------------|------------------- |---------- |---------------------- |--------- |
...
...
examples/docs/es/calendar.md
View file @
911ce3d3
...
...
@@ -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 |
|-----------------|------------------- |---------- |---------------------- |------------ |
...
...
examples/docs/fr-FR/calendar.md
View file @
911ce3d3
...
...
@@ -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 |
...
...
examples/docs/fr-FR/form.md
View file @
911ce3d3
...
...
@@ -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'] }
]"
>
...
...
examples/docs/zh-CN/calendar.md
View file @
911ce3d3
...
...
@@ -52,10 +52,6 @@
```
:::
:::tip
使用自定义范围时,不支持 first-day-of-week 属性。
:::
### Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|-----------------|-------------- |---------- |------------ |-------- |
...
...
packages/calendar/src/date-table.vue
View file @
911ce3d3
...
...
@@ -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
{
...
...
test/unit/specs/calendar.spec.js
View file @
911ce3d3
...
...
@@ -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
:
`
<el-calendar v-model="value" :first-day-of-week="0" :range="['2019-03-04', '2019-03-24']"></el-calendar>
`
,
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
'
);
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment