Skip to content

Commit

Permalink
always passing date.getTime() to state
Browse files Browse the repository at this point in the history
- some linting changes
  • Loading branch information
Padraic-O-Mhuiris committed Sep 25, 2019
1 parent cab6a57 commit 955867e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/CreatePoll/CreatePollTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function CreatePollTime({
clearIcon={null}
onChange={t =>
handleParentState({
start: t,
start: t.getTime(),
end: t.getTime() > end ? t.getTime() : end
})
}
Expand All @@ -59,7 +59,7 @@ export default function CreatePollTime({
<SectionWrapper>
<StyledBody>Poll Start Time (UTC):</StyledBody>
<Box width="600px">
<TimeLabel>{startUTC.substring(0, startUTC.length - 3)}</TimeLabel>
<TimeLabel>{startUTC.substring(0, startUTC.length - 4)}</TimeLabel>
</Box>
</SectionWrapper>
<SectionWrapper>
Expand All @@ -72,7 +72,7 @@ export default function CreatePollTime({
onChange={t =>
handleParentState({
start: t.getTime() < start ? t.getTime() : start,
end: t
end: t.getTime()
})
}
value={new Date(end)}
Expand All @@ -81,7 +81,7 @@ export default function CreatePollTime({
<SectionWrapper>
<StyledBody>Poll Start Time (UTC):</StyledBody>
<Box width="600px">
<TimeLabel>{endUTC.substring(0, endUTC.length - 3)}</TimeLabel>
<TimeLabel>{endUTC.substring(0, endUTC.length - 4)}</TimeLabel>
</Box>
</SectionWrapper>
<SectionWrapper>
Expand Down

1 comment on commit 955867e

@vercel
Copy link

@vercel vercel bot commented on 955867e Sep 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.