diff --git a/README.md b/README.md
index 245643b..b5a122a 100755
--- a/README.md
+++ b/README.md
@@ -116,6 +116,10 @@ DatePicker component. Renders as a [React-Bootstrap InputGroup](https://react-bo
* **Optional**
* **Type:** `bool`
* **Example:** `false`
+ * `calendarDisabled` - Whether or not the calendar popover will be disabled.
+ * **Optional**
+ * **Type:** `bool`
+ * **Example:** `false`
* `onChange` - Focus callback function.
* **Optional**
* **Type:** `function`
diff --git a/example/app.jsx b/example/app.jsx
index 4d2836c..d8e3639 100755
--- a/example/app.jsx
+++ b/example/app.jsx
@@ -129,6 +129,13 @@ const App = createReactClass({
Help
+
+
+ Calendar Disabled
+
+ Help
+
+
diff --git a/src/index.jsx b/src/index.jsx
index 1ac50bf..db6c4f1 100644
--- a/src/index.jsx
+++ b/src/index.jsx
@@ -267,6 +267,7 @@ export default createReactClass({
onFocus: PropTypes.func,
autoFocus: PropTypes.bool,
disabled: PropTypes.bool,
+ calendarDisabled: PropTypes.bool,
weekStartsOnMonday: (props, propName, componentName) => {
if (props[propName]) {
return new Error(`Prop '${propName}' supplied to '${componentName}' is obsolete. Use 'weekStartsOn' instead.`);
@@ -328,6 +329,7 @@ export default createReactClass({
showClearButton: true,
autoFocus: false,
disabled: false,
+ calendarDisabled: false,
showTodayButton: false,
todayButtonLabel: 'Today',
autoComplete: 'on',
@@ -676,13 +678,8 @@ export default createReactClass({
noValidate={this.props.noValidate}
/>;
- return
- {control}
-
+ />
-
-
+ ;
+
+ return
+ {control}
+ {overlay}
+ {!this.props.calendarDisabled && }
{this.props.showClearButton && !this.props.customControl &&
+
+ ;
+ }
+ });
+ yield new Promise(function(resolve, reject){
+ ReactDOM.render(, container, resolve);
+ });
+ const inputElement = document.querySelector("input.form-control");
+ TestUtils.Simulate.focus(inputElement);
+ const popover = document.querySelector(".date-picker-popover");
+ assert.equal(popover, null);
+ ReactDOM.unmountComponentAtNode(container);
+ }));
it("should display the correct day of the week in the calendar.", co.wrap(function *(){
const id = UUID.v4();
let value = null;