Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
dance-pc
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
5d27eb8f
authored
2024-07-26 13:17:28 +0800
by
杨炀
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:出生日期不能选择未来
1 parent
cf591983
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
src/viewsPc/match/components/addCoach.vue
src/viewsPc/match/components/addCoach_en.vue
src/viewsPc/match/components/addSportman_en.vue
src/viewsPc/match/components/addWdsf.vue
src/viewsPc/match/components/addCoach.vue
View file @
5d27eb8
...
...
@@ -46,7 +46,7 @@
</el-form-item>
</el-col>
<el-col
:lg=
"12"
>
<el-form-item
:label=
"language==0?'出生日期
1
':'Date of Birth'"
prop=
"birth"
required
>
<el-form-item
:label=
"language==0?'出生日期':'Date of Birth'"
prop=
"birth"
required
>
<el-date-picker
v-model=
"form.birth"
:disabled=
"editgay&&form.labelArr.indexOf('0')>-1"
style=
"width: 100%;"
...
...
@@ -250,9 +250,8 @@ function reset(){
})
}
}
function
disabledBirth
(
date
)
{
const
today
=
dayjs
().
format
(
'YYYY-MM-DD'
)
return
(
date
.
getTime
()
>=
dayjs
(
today
).
valueOf
())
function
disabledBirth
(
time
)
{
return
time
.
getTime
()
>
new
Date
().
getTime
()
}
function
getCountryList
()
{
match
.
countryList
().
then
(
res
=>
{
...
...
src/viewsPc/match/components/addCoach_en.vue
View file @
5d27eb8
...
...
@@ -90,12 +90,12 @@
:required=
"!form.wdsfMin&&form.labelArr.indexOf('0')>-1"
>
<el-input
v-model=
"form.idcCode"
:disabled=
"editgay"
@
blur=
"giveBirthDay"
/>
</el-form-item>
<el-form-item
:label=
"language==0?'
2
出生日期':'Date of Birth'"
prop=
"birth"
<el-form-item
:label=
"language==0?'出生日期':'Date of Birth'"
prop=
"birth"
:required=
"!form.wdsfMin&&form.labelArr.indexOf('0')>-1"
:disabled-date=
"disabledBirth"
>
>
<el-date-picker
v-model=
"form.birth"
:disabled=
"form.idcType=='0'"
style=
"width: 100%;"
style=
"width: 100%;"
:disabled-date=
"disabledBirth"
type=
"date"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
/>
</el-form-item>
...
...
src/viewsPc/match/components/addSportman_en.vue
View file @
5d27eb8
...
...
@@ -60,7 +60,7 @@
<el-form-item
:label=
"language==0?'出生日期':'Date of Birth'"
prop=
"birth"
>
<el-date-picker
v-model=
"form.birth"
:disabled=
"form.idcType=='0'"
style=
"width: 100%;"
style=
"width: 100%;"
:disabled-date=
"disabledBirth"
type=
"date"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
/>
</el-form-item>
...
...
@@ -390,6 +390,9 @@ function submitForm() {
function
cancel
()
{
show
.
value
=
false
}
function
disabledBirth
(
time
)
{
return
time
.
getTime
()
>
new
Date
().
getTime
()
}
</
script
>
<
style
lang=
"scss"
>
...
...
src/viewsPc/match/components/addWdsf.vue
View file @
5d27eb8
...
...
@@ -76,7 +76,7 @@
<el-form-item
:label=
"language==0?'出生日期':'Date of Birth'"
required
>
<el-date-picker
v-model=
"form.birth"
style=
"width: 100%;"
style=
"width: 100%;"
:disabled-date=
"disabledBirth"
type=
"date"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
/>
</el-form-item>
...
...
@@ -359,6 +359,10 @@ function codeSuccess(msg) {
}
})
}
function
disabledBirth
(
time
)
{
return
time
.
getTime
()
>
new
Date
().
getTime
()
}
</
script
>
<
style
lang=
"scss"
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment