Skip to content

Commit

Permalink
Revert "fix(datepicker): showCalendar no longer triggers if readOnly …
Browse files Browse the repository at this point in the history
…is true (#42)"

This reverts commit cfc0010.
  • Loading branch information
arthurdenner committed Oct 3, 2019
1 parent cfc0010 commit 92f945a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -47,7 +47,7 @@
"@storybook/react": "^3.4.0",
"babel-core": "^6.26.0",
"babel-runtime": "^6.26.0",
"kcd-scripts": "^1.8.0",
"kcd-scripts": "^1.4.0",
"prop-types": "^15.6.1",
"react": ">=16.2.1",
"react-dom": ">=16.2.1",
Expand Down
5 changes: 2 additions & 3 deletions src/components/datepicker.js
Expand Up @@ -91,7 +91,6 @@ class SemanticDatepicker extends React.Component {
pointing: 'left',
selected: null,
type: 'basic',
readOnly: false,
};

componentDidUpdate(prevProps) {
Expand Down Expand Up @@ -341,7 +340,7 @@ class SemanticDatepicker extends React.Component {
selectedDateFormatted,
typedValue,
} = this.state;
const { clearable, locale, pointing, filterDate, readOnly } = this.props;
const { clearable, locale, pointing, filterDate } = this.props;
return (
<div
className="field"
Expand All @@ -356,7 +355,7 @@ class SemanticDatepicker extends React.Component {
onBlur={this.handleBlur}
onChange={this.handleChange}
onClear={this.resetState}
onClick={readOnly ? null : this.showCalendar}
onClick={this.showCalendar}
onKeyDown={this.handleKeyDown}
value={typedValue || selectedDateFormatted}
/>
Expand Down

0 comments on commit 92f945a

Please sign in to comment.