Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
e944a239
Commit
e944a239
authored
Apr 18, 2022
by
Gavin Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复新增编辑逻辑判断
parent
00ff3228
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
assemblyTools.ts
src/pages/order/utils/assemblyTools.ts
+2
-3
No files found.
src/pages/order/utils/assemblyTools.ts
View file @
e944a239
...
...
@@ -115,9 +115,8 @@ const disabledDate = (current: moment.Moment) => {
return
current
&&
current
<
moment
().
startOf
(
'day'
)
}
const
yesterday
=
new
Date
(
new
Date
().
setDate
(
new
Date
().
getDate
()
-
1
))
const
year
=
new
Date
().
getFullYear
()
const
today
=
yesterday
.
getTime
()
const
yesterday
=
new
Date
(
new
Date
().
setDate
(
new
Date
().
getDate
()
-
1
))
.
getTime
()
/**
* 判断是否在今天之前,不包含今天
* - 例:today = 2022-04-18,2022-04-18之前但是不包含今天返回 true
...
...
@@ -125,7 +124,7 @@ const today = yesterday.getTime()
*/
const
afterToday
=
(
day
:
string
)
=>
{
// return new Date(`${year}-${day}`).getTime() < today // 包含今天判断
return
new
Date
(
`
${
year
}
-
${
day
}
`
).
getTime
()
<
to
day
return
new
Date
(
`
${
year
}
-
${
day
}
`
).
getTime
()
<
yester
day
}
export
{
...
...
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