Skip to content
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

setTime does not work for TimePicker #108

Open
nickrobinson352 opened this issue Mar 19, 2017 · 2 comments
Open

setTime does not work for TimePicker #108

nickrobinson352 opened this issue Mar 19, 2017 · 2 comments

Comments

@nickrobinson352
Copy link

the setTime API in TimePicker does not work for ios as there is a missing ref in TimePickerField.ios.js.

 setTime(date){
    this.refs.datePickerComponent.setDate(date);
  }

return(<DatePickerComponent
      {...this.props}
      mode="time"
 => ref='datePickerComponent'
      labelStyle={[formStyles.fieldText, this.props.labelStyle]}
      valueStyle = {[formStyles.fieldValue,this.props.valueStyle]}
      valueContainerStyle = {[formStyles.alignRight,
          formStyles.horizontalContainer, this.props.valueContainerStyle]}
      containerStyle={[
        formStyles.fieldContainer,
        formStyles.horizontalContainer,
        this.props.containerStyle,
      ]}
      />)

@pnthach95
Copy link

Android, too.
My code: this.refs.registrationForm.refs.timeMeeting.setTime(new Date());
My error:
screenshot_20171219-170237

@dchersey
Copy link

Just raised PR #134 with the fix for those who need it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants