bootstrap-select-country
based on the popular bootstrap-select
bootstrap-select-country is a jQuery plugin that utilizes Bootstrap's dropdown.js and bootstrap-select to provide country data and styling to standard select elements.
Dependencies
Usage
Create your <select>
with the .selectpicker
and .countrypicker
class. The data-api from bootstrap-select will automatically apply a basic theme to these elements. Then the data-api from countrypicker will populate the select with countries.
Minimal example
Here is a minimal example:
JS Bin
Copyright and license
Copyright (C) 2017-2018 country-picker
Licensed under the MIT license.
FAQ
Bootstrap 4 beta-2
Bootstrap-select is still incompatible (ver. 1.12.4) with Bootstrap 4 beta-2. Include an additional CSS file, or put the following between tags on the page you're displaying the country-picker on:
/*Make bootstrap-select work with bootstrap 4 see:https://github.com/silviomoreto/bootstrap-select/issues/1135*/ /* Make filled out selects be the same size as empty selects */