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

[DatePicker] Datepicker not opening with floatingLabelText set #3908

Closed
FragginWagon opened this issue Apr 8, 2016 · 4 comments · Fixed by #4418
Closed

[DatePicker] Datepicker not opening with floatingLabelText set #3908

FragginWagon opened this issue Apr 8, 2016 · 4 comments · Fixed by #4418
Labels
bug 🐛 Something doesn't work

Comments

@FragginWagon
Copy link

Problem Description

DatePicker with floatingLabelText does not allow me to open the datepicker when clicking where the floatingLabelText is located.

Code I am using right now for the DatePicker:

<DatePicker
                                    name="DP_Text"
                                    floatingLabelText="DP_Text Start Date"
                                    mode="landscape"
                                    container="dialog"
                                    autoOk={true}
                                    value={DP_Value}
                                    errorText={this.state.Errors}
                                    disabled={this.props.Other_DP_VALUE == null}
                                    onChange={(noevent, date) => this.func_call({variable: date}) }/>

Versions

Material-UI: 0.14.4
React: 0.14.7
Browser: Chrome

@FragginWagon FragginWagon changed the title DatePicker not opening with floatingLabelText set [DatePicker] Datepicker not opening with floatingLabelText set Apr 8, 2016
@FragginWagon
Copy link
Author

I was looking into this and it appears the label that is generated using floatingLabelText has a z-index of 1. If I change it to 0 it works as intended. Also, are you able to make floatingLabelText an official documented prop on the doc site please :)

@mbrookes
Copy link
Member

mbrookes commented Apr 8, 2016

@BinaryWasteland - please submit a PR for these changes. (property docs are taken from the code comment above the relevant prop.)

@nMustaki
Copy link

Another way to fix this is to disable pointerEvents (from #4218 )

floatingLabelStyle={{pointerEvents: 'none'}}

@mbrookes
Copy link
Member

@nMustaki #4248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants