Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
stillasTracker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aleksander Aaboen
stillasTracker
Commits
87c5e2a3
Commit
87c5e2a3
authored
3 years ago
by
Aleksander Aaboen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed input date format, to match required format for API
parent
8c0506a0
No related branches found
No related tags found
1 merge request
!56
Alex
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
webstillas/src/components/logistics/project/addProject.js
+11
-7
11 additions, 7 deletions
webstillas/src/components/logistics/project/addProject.js
with
11 additions
and
7 deletions
webstillas/src/components/logistics/project/addProject.js
+
11
−
7
View file @
87c5e2a3
...
@@ -49,12 +49,16 @@ class AddProject extends React.Component{
...
@@ -49,12 +49,16 @@ class AddProject extends React.Component{
}
}
dateFormat
(
date
){
const
dateArray
=
date
.
split
(
'
-
'
)
return
dateArray
[
2
]
+
'
-
'
+
dateArray
[
1
]
+
'
-
'
+
dateArray
[
0
]
}
generalInformation
(){
addProjectRequest
(){
}
generalInformation
(){
//todo integrere med api, slik at brukeren ikke trenger å skrive inn hele addressen.
//todo integrere med api, slik at brukeren ikke trenger å skrive inn hele addressen.
return
(
return
(
<
div
className
=
{
"
general-information
"
}
>
<
div
className
=
{
"
general-information
"
}
>
...
@@ -100,14 +104,14 @@ class AddProject extends React.Component{
...
@@ -100,14 +104,14 @@ class AddProject extends React.Component{
<
div
>
<
div
>
<
input
type
=
{
"
date
"
}
className
=
{
"
input-date-add
"
}
onChange
=
{
event
=>
<
input
type
=
{
"
date
"
}
className
=
{
"
input-date-add
"
}
onChange
=
{
event
=>
{
const
period
=
{...
this
.
state
.
period
};
{
const
period
=
{...
this
.
state
.
period
};
period
.
startDate
=
event
.
target
.
value
;
period
.
startDate
=
this
.
dateFormat
(
event
.
target
.
value
)
;
this
.
setState
({
period
})}}
/
>
this
.
setState
({
period
})}}
/
>
<
p
>
Enter
Start
date
<
/p
>
<
p
>
Enter
Start
date
<
/p
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
input
type
=
{
"
date
"
}
className
=
{
"
input-date-add
"
}
onChange
=
{
event
=>
<
input
type
=
{
"
date
"
}
className
=
{
"
input-date-add
"
}
onChange
=
{
event
=>
{
const
period
=
{...
this
.
state
.
period
};
{
const
period
=
{...
this
.
state
.
period
};
period
.
endDate
=
event
.
target
.
value
;
period
.
endDate
=
this
.
dateFormat
(
event
.
target
.
value
)
;
this
.
setState
({
period
})}}
/
>
this
.
setState
({
period
})}}
/
>
<
p
>
Enter
endDate
<
/p
>
<
p
>
Enter
endDate
<
/p
>
<
/div
>
<
/div
>
...
...
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