Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fitmin
web
Commits
438556b9
Commit
438556b9
authored
5 years ago
by
JunGu Kang
Browse files
Options
Downloads
Patches
Plain Diff
#23
Add Datetime Field Component and moment Dependency
parent
3a6be635
Branches
#23
Branches containing commit
No related tags found
2 merge requests
!37
Deploy
,
!23
#23 Add Datetime Field Component and moment Dependency
Pipeline
#4321
passed
5 years ago
Stage: lint
Stage: test
Stage: build
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
package-lock.json
+5
-0
5 additions, 0 deletions
package-lock.json
package.json
+1
-0
1 addition, 0 deletions
package.json
src/components/DateTimeField.vue
+93
-0
93 additions, 0 deletions
src/components/DateTimeField.vue
with
99 additions
and
0 deletions
package-lock.json
+
5
−
0
View file @
438556b9
...
@@ -8810,6 +8810,11 @@
...
@@ -8810,6 +8810,11 @@
}
}
}
}
},
},
"moment"
:
{
"version"
:
"2.24.0"
,
"resolved"
:
"https://registry.npmjs.org/moment/-/moment-2.24.0.tgz"
,
"integrity"
:
"sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
},
"move-concurrently"
:
{
"move-concurrently"
:
{
"version"
:
"1.0.1"
,
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz"
,
...
...
This diff is collapsed.
Click to expand it.
package.json
+
1
−
0
View file @
438556b9
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
},
},
"dependencies"
:
{
"dependencies"
:
{
"
core-js
"
:
"
^3.3.2
"
,
"
core-js
"
:
"
^3.3.2
"
,
"
moment
"
:
"
^2.24.0
"
,
"
vue
"
:
"
^2.6.10
"
,
"
vue
"
:
"
^2.6.10
"
,
"
vue-router
"
:
"
^3.1.3
"
,
"
vue-router
"
:
"
^3.1.3
"
,
"
vuetify
"
:
"
^2.1.0
"
,
"
vuetify
"
:
"
^2.1.0
"
,
...
...
This diff is collapsed.
Click to expand it.
src/components/DateTimeField.vue
0 → 100644
+
93
−
0
View file @
438556b9
<
template
>
<v-row>
<v-col
cols=
"6"
>
<v-menu
:close-on-content-click=
"false"
min-width=
"290px"
offset-y
v-model=
"showDatePicker"
>
<template
v-slot:activator=
"
{ on }"
>
<v-text-field
label=
"날짜"
readonly
v-model=
"date"
v-on=
"on"
></v-text-field>
</
template
>
<v-date-picker
v-model=
"date"
@
input=
"showDatePicker = false"
></v-date-picker>
</v-menu>
</v-col>
<v-col
col=
"6"
>
<v-menu
:close-on-content-click=
"false"
min-width=
"290px"
offset-y
v-model=
"showTimePicker"
>
<
template
v-slot:activator=
"{ on }"
>
<v-text-field
label=
"시각"
readonly
v-model=
"time"
v-on=
"on"
></v-text-field>
</
template
>
<v-time-picker
v-model=
"time"
@
input=
"showTimePicker = false"
></v-time-picker>
</v-menu>
</v-col>
</v-row>
</template>
<
script
>
import
moment
from
'
moment
'
;
export
default
{
name
:
'
DateTimeField
'
,
props
:
[
'
datetime
'
],
data
:
()
=>
({
showDatePicker
:
false
,
showTimePicker
:
false
,
date
:
''
,
time
:
''
,
}),
watch
:
{
date
()
{
this
.
$emit
(
'
update:datetime
'
,
`
${
this
.
date
}
${
this
.
time
}
`
);
},
time
()
{
this
.
$emit
(
'
update:datetime
'
,
`
${
this
.
date
}
${
this
.
time
}
`
);
},
},
created
()
{
const
m
=
moment
(
this
.
datetime
);
this
.
date
=
m
.
format
(
'
YYYY-MM-DD
'
);
this
.
time
=
m
.
format
(
'
HH:mm
'
);
},
};
</
script
>
<
style
scoped
>
.col
{
padding
:
0
12px
0
;
}
</
style
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment