Skip to content

Commit f298966

Browse files
author
Luke Dubert
committed
fix bug around clearing input and pressing enter
1 parent adf0a6b commit f298966

File tree

9 files changed

+15
-11
lines changed

9 files changed

+15
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
## 1.2.5
5+
6+
- [bug] fixed bug created by React 15 when clearing input and pressing enter
7+
48
## 1.2.4
59

610
- updated all packages to latest versions (most notably react to 15)

dist/bundle.js

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

dist/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default class App extends Component {
9393
<div style={style.page}>
9494
<header style={style.header}>
9595
<div>
96-
<h1 style={{ margin: 0 }}>React Kronos 1.2.4</h1>
96+
<h1 style={{ margin: 0 }}>React Kronos 1.2.5</h1>
9797
<span style={style.tagline}>A fast, intuitive, and elegant date and time picker for React.</span>
9898
</div>
9999
<div style={style.icon}>

examples/bundle.js

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

examples/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<head>
3-
<title>React Kronos 1.2.4</title>
3+
<title>React Kronos 1.2.5</title>
44
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700' rel='stylesheet' type='text/css'>
55
<style>
66
html, body, #root {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-kronos",
3-
"version": "1.2.4",
3+
"version": "1.2.5",
44
"description": "A fast, intuitive, and elegant date and time picker for React.",
55
"main": "lib/index.js",
66
"scripts": {

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class Kronos extends Component {
340340
else {
341341
if (!this.state.visible) this.toggle(true)
342342
datetime = this.parse(this.state.input)
343-
this.save(datetime)
343+
if (datetime) this.save(datetime)
344344
}
345345
}
346346
break
@@ -364,7 +364,7 @@ class Kronos extends Component {
364364
<input
365365
type='text'
366366
ref='input'
367-
value={this.state.input}
367+
value={this.state.input || ''}
368368
onClick={::this.onClickInput}
369369
onFocus={::this.onFocusInput}
370370
onBlur={::this.onBlurInput}

0 commit comments

Comments
 (0)