Skip to content

Commit

Permalink
fix(datepicker): #247
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Aug 8, 2019
1 parent d849b99 commit d51e341
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/client/containers/Tickets/SingleTicketContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import helpers from 'lib/helpers'
import Log from '../../logger'
import socket from 'lib/socket'
import UIkit from 'uikit'
import moment from 'moment'
import SpinLoader from 'components/SpinLoader'

const fetchTicket = parent => {
Expand Down Expand Up @@ -411,10 +412,13 @@ class SingleTicketContainer extends React.Component {
Clear
</a>
<DatePicker
format={this.props.common.shortDateFormat}
format={helpers.getShortDateFormat()}
value={this.ticket.dueDate}
onChange={e => {
socket.ui.setTicketDueDate(this.ticket._id, e.target.value)
const dueDate = moment(e.target.value, helpers.getShortDateFormat())
.utc()
.toISOString()
socket.ui.setTicketDueDate(this.ticket._id, dueDate)
}}
/>
</div>
Expand Down

0 comments on commit d51e341

Please sign in to comment.