Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Coscine
frontend
libraries
form-generator
Commits
2ae14642
Commit
2ae14642
authored
Feb 09, 2022
by
Benedikt Heinrichs
Browse files
Update: DateTime Handling (coscine/issues#1607)
parent
89d529d0
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/InputTextField.vue
View file @
2ae14642
...
...
@@ -6,6 +6,7 @@
:disabled=
"disabledMode || locked"
:required=
"required"
:state=
"state"
:type=
"type"
/>
</
template
>
...
...
@@ -39,6 +40,22 @@ export default Vue.extend({
datatype
[
'
value
'
]
);
if
(
datatype
[
'
value
'
].
endsWith
(
'
#dateTime
'
))
{
this
.
type
=
'
datetime-local
'
;
}
else
if
(
datatype
[
'
value
'
].
endsWith
(
'
#byte
'
)
||
datatype
[
'
value
'
].
endsWith
(
'
#int
'
)
||
datatype
[
'
value
'
].
endsWith
(
'
#short
'
)
||
datatype
[
'
value
'
].
endsWith
(
'
#integer
'
)
||
datatype
[
'
value
'
].
endsWith
(
'
#long
'
)
||
datatype
[
'
value
'
].
endsWith
(
'
#unsignedByte
'
)
||
datatype
[
'
value
'
].
endsWith
(
'
#unsignedShort
'
)
||
datatype
[
'
value
'
].
endsWith
(
'
#unsignedInt
'
)
||
datatype
[
'
value
'
].
endsWith
(
'
#unsignedLong
'
)
)
{
this
.
type
=
'
number
'
;
}
if
(
this
.
fixedValueMode
)
{
this
.
updateFixedValues
(
this
.
entryKey
);
}
...
...
@@ -49,6 +66,7 @@ export default Vue.extend({
data
()
{
return
{
textValue
:
''
,
type
:
'
text
'
,
};
},
props
:
{
...
...
@@ -73,6 +91,9 @@ export default Vue.extend({
},
methods
:
{
input
()
{
if
(
this
.
type
===
'
datetime-local
'
)
{
this
.
textValue
+=
'
:00
'
;
}
FieldReader
.
setField
(
this
.
formData
,
this
.
v
,
...
...
CoscineBot
⚙
@CoscineBot
mentioned in commit
7f1d93cf
·
Feb 14, 2022
mentioned in commit
7f1d93cf
mentioned in commit 7f1d93cffcbc8172e22af264b5ff239d99499e64
Toggle commit list
Write
Preview
Supports
Markdown
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