Skip to content

Commit 81858f6

Browse files
authored
Merge pull request #12 from NastuzziSamy/patch-1
Fix editable inputs
2 parents 8c1d602 + 1c7e572 commit 81858f6

File tree

3 files changed

+55
-18
lines changed

3 files changed

+55
-18
lines changed

lib/index.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ class DatetimeRangePicker extends Component {
110110
}
111111

112112
onStartDateChange(date) {
113+
if (typeof date === 'string') {
114+
return;
115+
}
116+
113117
const options = {
114118
start: date,
115119
};
@@ -125,6 +129,10 @@ class DatetimeRangePicker extends Component {
125129
}
126130

127131
onEndDateChange(date) {
132+
if (typeof date === 'string') {
133+
return;
134+
}
135+
128136
this.setState({ end: date }, () => {
129137
this.props.onChange(this.propsToPass());
130138
this.props.onEndDateChange(this.propsToPass().end);

npm-shrinkwrap.json

Lines changed: 46 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-datetime-range-picker",
33
"description": "Reusable date time range picker",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"author": "Samuel Amoah <sa.am@programmer.net>",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)