Skip to content

Optional moment.js Part 2 #1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Remove moment from timezone_date_picker
  • Loading branch information
Nikolaus Piccolotto committed Oct 3, 2017
commit 170ea3297def115128e2eb8282c92e3c9035c7f8
3 changes: 2 additions & 1 deletion test/timezone_date_picker.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import DatePicker from '../src/datepicker.jsx'
import * as utils from '../src/date_utils'

class TimezoneDatePicker extends React.Component {
constructor (props) {
Expand All @@ -13,7 +14,7 @@ class TimezoneDatePicker extends React.Component {

render () {
var selected = this.state.startDate &&
this.state.startDate.clone().utcOffset(this.state.utcOffset)
utils.setUTCOffset(utils.cloneDate(this.state.startDate), this.state.utcOffset)

return <DatePicker
utcOffset={this.state.utcOffset}
Expand Down