Skip to content

Instantly share code, notes, and snippets.

@schneidmaster
Created January 28, 2016 19:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schneidmaster/e79ee4fbbbdf6bc2cac4 to your computer and use it in GitHub Desktop.
Save schneidmaster/e79ee4fbbbdf6bc2cac4 to your computer and use it in GitHub Desktop.
react-bootstrap + react-maskedinput
import React from 'react';
import classNames from 'classnames';
import { Input } from 'react-bootstrap';
import MaskedInputField from 'react-maskedinput';
export default class MaskedInput extends Input {
renderInput() {
const className = this.isCheckboxOrRadio() || this.isFile() ? '' : 'form-control';
return <MaskedInputField {...this.props} className={classNames(this.props.className, className)} ref="input" key="input" />;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment