Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
pingan-life-index-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5586c14a
authored
2020-02-20 11:24:03 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
15a893f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
src/components/date-picker/date-picker.js
src/components/date-picker/date-picker.js
View file @
5586c14
...
...
@@ -310,11 +310,11 @@ export default {
let
yearList
=
[];
for
(
let
index
=
0
;
index
<
12
;
index
++
)
{
yearList
.
push
({
year
:
yearPage
*
10
+
index
,
year
:
yearPage
*
10
+
index
,
// disable: index == 0 || index == 11,
// gray: index == 0 || index == 11,
disable
:
index
>=
10
,
gray
:
index
>=
10
,
gray
:
index
>=
10
,
});
}
this
.
yearRange
=
`
${
yearPage
*
10
+
0
}
-
${
yearPage
*
10
+
9
}
`
...
...
@@ -413,9 +413,11 @@ export default {
}
});
if
(
!
disable
)
{
if
(
this
.
formatter
==
"yyyy-MM-dd"
)
{
disable
=
!
/^
((?!
0000
)[
0-9
]{4}
-
((
0
[
1-9
]
|1
[
0-2
])
-
(
0
[
1-9
]
|1
[
0-9
]
|2
[
0-8
])
|
(
0
[
13-9
]
|1
[
0-2
])
-
(
29|30
)
|
(
0
[
13578
]
|1
[
02
])
-31
)
|
([
0-9
]{2}(
0
[
48
]
|
[
2468
][
048
]
|
[
13579
][
26
])
|
(
0
[
48
]
|
[
2468
][
048
]
|
[
13579
][
26
])
00
)
-02-29
)
$/
.
test
(
dateValue
);
let
reDateValue
=
dateValue
;
if
(
this
.
formatter
==
"dd-MM-yyyy"
)
{
reDateValue
=
ddMMyyyy2yyyyMMdd
(
reDateValue
);
}
disable
=
!
/^
((?!
0000
)[
0-9
]{4}
-
((
0
[
1-9
]
|1
[
0-2
])
-
(
0
[
1-9
]
|1
[
0-9
]
|2
[
0-8
])
|
(
0
[
13-9
]
|1
[
0-2
])
-
(
29|30
)
|
(
0
[
13578
]
|1
[
02
])
-31
)
|
([
0-9
]{2}(
0
[
48
]
|
[
2468
][
048
]
|
[
13579
][
26
])
|
(
0
[
48
]
|
[
2468
][
048
]
|
[
13579
][
26
])
00
)
-02-29
)
$/
.
test
(
reDateValue
);
}
let
result
=
{
dateValue
:
this
.
dateValue
,
...
...
Please
register
or
sign in
to post a comment