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
a1498288
Commit
a1498288
authored
Mar 21, 2019
by
Jiewei Qian
Committed by
iamkun
Mar 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
date-picker: fix default-value DST (#14562)
parent
3c4354e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
packages/date-picker/src/panel/date-range.vue
packages/date-picker/src/panel/date-range.vue
+3
-6
No files found.
packages/date-picker/src/panel/date-range.vue
View file @
a1498288
...
@@ -197,6 +197,7 @@
...
@@ -197,6 +197,7 @@
nextYear
,
nextYear
,
prevMonth
,
prevMonth
,
nextMonth
,
nextMonth
,
nextDate
,
extractDateFormat
,
extractDateFormat
,
extractTimeFormat
extractTimeFormat
}
from
'
../util
'
;
}
from
'
../util
'
;
...
@@ -207,17 +208,13 @@
...
@@ -207,17 +208,13 @@
import
ElInput
from
'
element-ui/packages/input
'
;
import
ElInput
from
'
element-ui/packages/input
'
;
import
ElButton
from
'
element-ui/packages/button
'
;
import
ElButton
from
'
element-ui/packages/button
'
;
const
advanceDate
=
(
date
,
amount
)
=>
{
return
new
Date
(
new
Date
(
date
).
getTime
()
+
amount
);
};
const
calcDefaultValue
=
(
defaultValue
)
=>
{
const
calcDefaultValue
=
(
defaultValue
)
=>
{
if
(
Array
.
isArray
(
defaultValue
))
{
if
(
Array
.
isArray
(
defaultValue
))
{
return
[
new
Date
(
defaultValue
[
0
]),
new
Date
(
defaultValue
[
1
])];
return
[
new
Date
(
defaultValue
[
0
]),
new
Date
(
defaultValue
[
1
])];
}
else
if
(
defaultValue
)
{
}
else
if
(
defaultValue
)
{
return
[
new
Date
(
defaultValue
),
advanceDate
(
defaultValue
,
24
*
60
*
60
*
1000
)];
return
[
new
Date
(
defaultValue
),
nextDate
(
new
Date
(
defaultValue
),
1
)];
}
else
{
}
else
{
return
[
new
Date
(),
advanceDate
(
Date
.
now
(),
24
*
60
*
60
*
1000
)];
return
[
new
Date
(),
nextDate
(
new
Date
(),
1
)];
}
}
};
};
...
...
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