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

What about select? #26

Open
patelhs opened this issue Dec 16, 2015 · 5 comments
Open

What about select? #26

patelhs opened this issue Dec 16, 2015 · 5 comments

Comments

@patelhs
Copy link

patelhs commented Dec 16, 2015

Is there a way to include select (dropdown list)?

@FutureKode
Copy link

+1

@rpdobson123
Copy link

It seems you actually can use selects.

using type='select' and enclosing option tags seems to work just as you'd expect - react-bootstrap-validation uses the es6 spread operator so most basic tags work out of the box - datepicker's seem to also work, given proper format.

@MasterMarandu
Copy link

@rpdobson123
what do you mean by proper format? can you give an example please?

@murali4ever
Copy link

This example worked for me :)
image

@rpdobson123
Copy link

@Cabeza, I mean to say that you would give the attributes as you would expect the browser to render an input. Provide a type and any other properties. type='date' or akin to @murali4ever's provided example. Any attributes in an element created with react-bootstrap-validation reach the DOM element it produces. That's because the spread operator hands over anything it doesn't explicitly handle by key (required, label, errorHelp etc etc)..
<ValidatedInput name='userBirthday' ref='userBirthday' validate='required' type='date' errorHelp='Select your birthday' label='Birthday' />

Something along those lines should work. react-bootstrap-validation doesn't provide explicit handling because it doesn't need to.

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

5 participants