react-bootstrap-validation icon indicating copy to clipboard operation
react-bootstrap-validation copied to clipboard

What about select?

Open patelhs opened this issue 8 years ago • 5 comments

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

patelhs avatar Dec 16 '15 20:12 patelhs

+1

FutureKode avatar Jan 15 '16 16:01 FutureKode

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.

rpdobson123 avatar Jan 25 '16 22:01 rpdobson123

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

MasterMarandu avatar Mar 07 '16 19:03 MasterMarandu

This example worked for me :) image

murali4ever avatar Mar 30 '16 17:03 murali4ever

@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.

rpdobson123 avatar Apr 22 '16 19:04 rpdobson123