Skip to content

Commit 92f945a

Browse files
authored
Revert "fix(datepicker): showCalendar no longer triggers if readOnly is true (#42)"
This reverts commit cfc0010.
1 parent cfc0010 commit 92f945a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@storybook/react": "^3.4.0",
4848
"babel-core": "^6.26.0",
4949
"babel-runtime": "^6.26.0",
50-
"kcd-scripts": "^1.8.0",
50+
"kcd-scripts": "^1.4.0",
5151
"prop-types": "^15.6.1",
5252
"react": ">=16.2.1",
5353
"react-dom": ">=16.2.1",

src/components/datepicker.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class SemanticDatepicker extends React.Component {
9191
pointing: 'left',
9292
selected: null,
9393
type: 'basic',
94-
readOnly: false,
9594
};
9695

9796
componentDidUpdate(prevProps) {
@@ -341,7 +340,7 @@ class SemanticDatepicker extends React.Component {
341340
selectedDateFormatted,
342341
typedValue,
343342
} = this.state;
344-
const { clearable, locale, pointing, filterDate, readOnly } = this.props;
343+
const { clearable, locale, pointing, filterDate } = this.props;
345344
return (
346345
<div
347346
className="field"
@@ -356,7 +355,7 @@ class SemanticDatepicker extends React.Component {
356355
onBlur={this.handleBlur}
357356
onChange={this.handleChange}
358357
onClear={this.resetState}
359-
onClick={readOnly ? null : this.showCalendar}
358+
onClick={this.showCalendar}
360359
onKeyDown={this.handleKeyDown}
361360
value={typedValue || selectedDateFormatted}
362361
/>

0 commit comments

Comments
 (0)