From cb1ad1afe8e1e0845fdbda8ec91e383b1ea8ec4c Mon Sep 17 00:00:00 2001 From: Anatoly Popov Date: Wed, 17 Jul 2019 13:55:35 +0700 Subject: [PATCH 01/21] Fix empty ref scroll --- lib/DatePickerItem.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/DatePickerItem.js b/lib/DatePickerItem.js index 89078b2..4873460 100644 --- a/lib/DatePickerItem.js +++ b/lib/DatePickerItem.js @@ -41,6 +41,7 @@ class DatePickerItem extends Component { this.translateY = 0; // 容器偏移的距离 this.currentIndex = MIDDLE_INDEX; // 滑动中当前日期的索引 this.moveDateCount = 0; // 一次滑动移动了多少个时间 + this._moveToTimer = null; this.state = { translateY: MIDDLE_Y, @@ -97,6 +98,8 @@ class DatePickerItem extends Component { viewport.removeEventListener('touchmove', this.handleContentTouch, false); viewport.removeEventListener('touchend', this.handleContentTouch, false); viewport.removeEventListener('mousedown', this.handleContentMouseDown, false); + + clearTimeout(this._moveToTimer); } _iniDates(date) { @@ -160,26 +163,25 @@ class DatePickerItem extends Component { this._updateDates(-1); } - this._moveTo(this.refs.scroll, this.currentIndex); + this._moveTo(this.currentIndex); } /** * 添加滑动动画 - * @param {DOM} obj DOM对象 * @param {number} angle 角度 * @return {undefined} */ - _moveTo(obj, currentIndex) { + _moveTo(currentIndex) { this.animating = true; - addPrefixCss(obj, { transition: 'transform .2s ease-out' }); + addPrefixCss(this.refs.scroll, { transition: 'transform .2s ease-out' }); this.setState({ translateY: -currentIndex * DATE_HEIGHT, }); // NOTE: There is no transitionend, setTimeout is used instead. - setTimeout(() => { + this._moveToTimer = setTimeout(() => { this.animating = false; this.props.onSelect(this.state.dates[MIDDLE_INDEX]); this._clearTransition(this.refs.scroll); From ac8fb111461f80323d42fa2a7c0aded5d27a4afa Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 10:50:34 -0500 Subject: [PATCH 02/21] [feature] Support for wheel event (mvieracanive) --- lib/DatePickerItem.js | 58 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/lib/DatePickerItem.js b/lib/DatePickerItem.js index 4873460..1d8f472 100644 --- a/lib/DatePickerItem.js +++ b/lib/DatePickerItem.js @@ -11,6 +11,8 @@ const DATE_HEIGHT = 40; // 每个日期的高度 const DATE_LENGTH = 10; // 日期的个数 const MIDDLE_INDEX = Math.floor(DATE_LENGTH / 2); // 日期数组中间值的索引 const MIDDLE_Y = - DATE_HEIGHT * MIDDLE_INDEX; // translateY值 +const WHEEL_DELTA_Y = DATE_HEIGHT +const WHEEL_STOP = 200 const isUndefined = val => typeof val === 'undefined'; const isFunction = val => Object.prototype.toString.apply(val) === '[object Function]'; @@ -42,6 +44,9 @@ class DatePickerItem extends Component { this.currentIndex = MIDDLE_INDEX; // 滑动中当前日期的索引 this.moveDateCount = 0; // 一次滑动移动了多少个时间 this._moveToTimer = null; + this.wheelMoveTimer = null + this.wheelMoveStarted = false + this.wheelYOffset = 0 this.state = { translateY: MIDDLE_Y, @@ -53,6 +58,7 @@ class DatePickerItem extends Component { this.handleContentMouseDown = this.handleContentMouseDown.bind(this); this.handleContentMouseMove = this.handleContentMouseMove.bind(this); this.handleContentMouseUp = this.handleContentMouseUp.bind(this); + this.handleContentWheelMove = this.handleContentWheelMove.bind(this) } componentWillMount() { @@ -65,6 +71,7 @@ class DatePickerItem extends Component { viewport.addEventListener('touchmove', this.handleContentTouch, false); viewport.addEventListener('touchend', this.handleContentTouch, false); viewport.addEventListener('mousedown', this.handleContentMouseDown, false); + viewport.addEventListener('wheel', this.handleContentWheelMove, false) } componentWillReceiveProps(nextProps) { @@ -98,7 +105,8 @@ class DatePickerItem extends Component { viewport.removeEventListener('touchmove', this.handleContentTouch, false); viewport.removeEventListener('touchend', this.handleContentTouch, false); viewport.removeEventListener('mousedown', this.handleContentMouseDown, false); - + viewport.removeEventListener('wheel', this.handleContentWheelMove, false); + clearTimeout(this._moveToTimer); } @@ -201,12 +209,16 @@ class DatePickerItem extends Component { handleMove(event) { - const touchY = + let touchY = (!isUndefined(event.targetTouches) && !isUndefined(event.targetTouches[0])) ? event.targetTouches[0].pageY : event.pageY; + if (event.type === 'wheel') { + touchY = event.pageY + this.wheelYOffset + } + const dir = touchY - this.touchY; const translateY = this.translateY + dir; const direction = dir > 0 ? -1 : 1; @@ -229,7 +241,12 @@ class DatePickerItem extends Component { } handleEnd(event) { - const touchY = event.pageY || event.changedTouches[0].pageY; + let touchY = event.pageY || (event.changedTouches && event.changedTouches[0].pageY); + + if (event.type === 'wheel') { + touchY = event.pageY + this.wheelYOffset + } + const dir = touchY - this.touchY; const direction = dir > 0 ? -1 : 1; this._moveToNext(direction); @@ -257,6 +274,41 @@ class DatePickerItem extends Component { * @param {Object} event 事件对象 * @return {undefined} */ + handleContentWheelMove(event) { + this.wheelYOffset += WHEEL_DELTA_Y * Math.sign(event.deltaY) + + if (this.animating) return; + + if (!this.wheelMoveStarted) { + this.handleStart(event); + this.wheelMoveStarted = true + } + + if (this.wheelMoveTimer) { + window.clearTimeout(this.wheelMoveTimer) + } + + this.wheelMoveTimer = window.setTimeout( + () => this.handleContenWheelStop.bind(this)(event), + WHEEL_STOP + ) + + if (this.wheelMoveStarted) { + this.handleMove(event) + } + } + + handleContenWheelStop(event) { + this.wheelYOffset -= WHEEL_DELTA_Y * Math.sign(event.deltaY) + + if (this.wheelMoveStarted) { + this.wheelMoveStarted = false + this.wheelYOffset = 0 + + this.handleEnd(event); + } + } + handleContentMouseDown(event) { if (this.animating) return; this.handleStart(event); From 20e14b10a2e6c45ff4122c2883511b9713e093be Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 10:53:38 -0500 Subject: [PATCH 03/21] [feature] Support for wheel event (mvieracanive) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ff479a1..d08ab0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-mobile-datepicker", - "version": "4.0.2", + "version": "4.0.3", "description": "一个移动端时间选择器react组件", "main": "./dist/react-mobile-datepicker.js", "amdName": "reactMobileDatePicker", @@ -29,7 +29,7 @@ "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook" }, - "author": "rainie", + "author": "rainie (Maia colaboration)", "devDependencies": { "@storybook/addon-info": "^3.2.12", "@storybook/react": "^3.2.12", From be4f1d2277958db78db141de524755bc953dee34 Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 11:05:41 -0500 Subject: [PATCH 04/21] [feature] Support for wheel event (mvieracanive) --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d08ab0b..cdb90c2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./dist/react-mobile-datepicker.js", "amdName": "reactMobileDatePicker", "minified:main": "dist/react-mobile-datepicker.min.js", - "repository": "lanjingling0510/react-mobile-datepicker", + "repository": "maiavierasedicii/react-mobile-datepicker", "homepage": "https://github.com/lanjingling0510/react-mobile-datepicker#readme", "keywords": [ "react-component", @@ -14,6 +14,7 @@ "datepicker", "react", "mobile", + "wheel-event", "calendar" ], "scripts": { From 0b62ffa867fa3605bc24bb9a96bbe2a5d5442236 Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 11:29:54 -0500 Subject: [PATCH 05/21] [feature] Support for wheel event (mvieracanive) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cdb90c2..f3d9569 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "react-mobile-datepicker", + "name": "react-web-datepicker", "version": "4.0.3", "description": "一个移动端时间选择器react组件", "main": "./dist/react-mobile-datepicker.js", - "amdName": "reactMobileDatePicker", + "amdName": "reactMobileDatePicker-wheel", "minified:main": "dist/react-mobile-datepicker.min.js", "repository": "maiavierasedicii/react-mobile-datepicker", "homepage": "https://github.com/lanjingling0510/react-mobile-datepicker#readme", From d2f6c00bb5d08693ed87498a6894bd76d8e39c8a Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 12:03:27 -0500 Subject: [PATCH 06/21] [feature] Support for wheel event (mvieracanive) --- .npmignore | 18 +++++++++++++++--- package.json | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.npmignore b/.npmignore index 52594c7..4ccc9fd 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,16 @@ -test -examples -.nyc_output +test/ +examples/ +.nyc_output/ coverage/ +stories/ +sotrybook-static/ +lib/*.js +.github +.sotrybook/ +.babelrc +.eslintrc +.gitignore +.travis.yml +postcss.config.js +rollup.config.js +webpack.config.js \ No newline at end of file diff --git a/package.json b/package.json index f3d9569..35f805a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-web-datepicker", - "version": "4.0.3", + "version": "4.0.4", "description": "一个移动端时间选择器react组件", "main": "./dist/react-mobile-datepicker.js", "amdName": "reactMobileDatePicker-wheel", From 4c10fbc9458d1932dc2995c950662ff8496b4dbb Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 12:05:24 -0500 Subject: [PATCH 07/21] [feature] Support for wheel event (mvieracanive) --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 126fe4c..0243923 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ node_modules/ examples/__build__/ .nyc_output/ coverage/ -dist From 0f42ea6d636e0140d82208d5de1b6933ef48c5ec Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 12:15:33 -0500 Subject: [PATCH 08/21] [feature] Support for wheel event (mvieracanive) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0243923..126fe4c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ examples/__build__/ .nyc_output/ coverage/ +dist From 6667c7fc6ebfc48414c3d06ef4622f8360087b15 Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 14:32:31 -0500 Subject: [PATCH 09/21] [feature] Support for wheel event (mvieracanive) --- lib/DatePicker.js | 4 +++- lib/DatePickerItem.js | 9 ++++++++- lib/index.css | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/DatePicker.js b/lib/DatePicker.js index 22ceed3..f248f50 100644 --- a/lib/DatePicker.js +++ b/lib/DatePicker.js @@ -24,6 +24,7 @@ type Props = { onChange: Function, onSelect: Function, onCancel: Function, + themeColor?: String, } type State = { @@ -198,7 +199,8 @@ class DatePicker extends Component { step={item.step} type={item.type} format={item.format} - onSelect={this.handleDateSelect} /> + onSelect={this.handleDateSelect} + themeColor={ this.props.themeColor } /> ))} {showFooter &&
diff --git a/lib/DatePickerItem.js b/lib/DatePickerItem.js index 1d8f472..8946083 100644 --- a/lib/DatePickerItem.js +++ b/lib/DatePickerItem.js @@ -24,6 +24,7 @@ type Props = { format: string | Array<*>, step: number, onSelect: Function, + themeColor?: String, } type State = { @@ -360,12 +361,18 @@ class DatePickerItem extends Component { marginTop: this.state.marginTop, }); + const style = {} + if (this.props.themeColor) { + style.borderTopColor = this.props.themeColor + style.borderBottomColor = this.props.themeColor + } + return (
this.viewport = viewport} // eslint-disable-line className="datepicker-viewport"> -
+
    Date: Thu, 5 Jan 2023 14:37:08 -0500 Subject: [PATCH 10/21] [feature] Support for wheel event (mvieracanive) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 35f805a..3ae1e65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-web-datepicker", - "version": "4.0.4", + "version": "4.0.5", "description": "一个移动端时间选择器react组件", "main": "./dist/react-mobile-datepicker.js", "amdName": "reactMobileDatePicker-wheel", From 8682e7b2dbac712ee54de8dcdb571f33769eec27 Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Thu, 5 Jan 2023 14:50:02 -0500 Subject: [PATCH 11/21] [feature] Support for wheel event (mvieracanive) --- lib/DatePicker.js | 4 ++-- lib/DatePickerItem.js | 10 ++-------- package.json | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/DatePicker.js b/lib/DatePicker.js index f248f50..27bec3a 100644 --- a/lib/DatePicker.js +++ b/lib/DatePicker.js @@ -24,7 +24,7 @@ type Props = { onChange: Function, onSelect: Function, onCancel: Function, - themeColor?: String, + themeClass?: String, } type State = { @@ -200,7 +200,7 @@ class DatePicker extends Component { type={item.type} format={item.format} onSelect={this.handleDateSelect} - themeColor={ this.props.themeColor } /> + themeClass={ this.props.themeClass } /> ))}
{showFooter &&
diff --git a/lib/DatePickerItem.js b/lib/DatePickerItem.js index 8946083..d2a07cc 100644 --- a/lib/DatePickerItem.js +++ b/lib/DatePickerItem.js @@ -24,7 +24,7 @@ type Props = { format: string | Array<*>, step: number, onSelect: Function, - themeColor?: String, + themeClass?: String, } type State = { @@ -361,18 +361,12 @@ class DatePickerItem extends Component { marginTop: this.state.marginTop, }); - const style = {} - if (this.props.themeColor) { - style.borderTopColor = this.props.themeColor - style.borderBottomColor = this.props.themeColor - } - return (
this.viewport = viewport} // eslint-disable-line className="datepicker-viewport"> -
+
+ {this.props.showScrollButtons && (
+
this.handleContentClick(e, -1) } > + ▼ +
+
)}
); } diff --git a/lib/index.css b/lib/index.css index 1891b27..7a5785b 100644 --- a/lib/index.css +++ b/lib/index.css @@ -83,6 +83,35 @@ font-size: 1.2em; } + .datepicker-scroll-btn { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + margin: 0 .25em; + cursor: pointer; + } + + .datepicker-scroll-btn-icon { + border-radius: 100%; + display: flex; + font-size: 12px; + color: darkgray; + align-items: center; + justify-content: center; + transition: background-color 1s; + height: 20px; + width: 20px; + } + + .datepicker-scroll-btn-icon:active { + background: rgba(0,0,0,0.4); + } + + .datepicker-scroll-btn-icon:hover { + color: rgb(17, 17, 17); + } + .datepicker-content { display: flex; padding: .5em .25em; diff --git a/package.json b/package.json index 18be5f2..be34723 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-web-datepicker", - "version": "4.0.11", + "version": "4.0.12", "description": "一个移动端时间选择器react组件", "main": "./dist/react-mobile-datepicker.js", "amdName": "reactMobileDatePicker-wheel", @@ -15,6 +15,8 @@ "react", "mobile", "wheel-event", + "3-wheels", + "scroll-buttons", "calendar" ], "scripts": { @@ -30,7 +32,7 @@ "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook" }, - "author": "rainie (Maia colaboration)", + "author": "rainie (Maia collaboration)", "devDependencies": { "@storybook/addon-info": "^3.2.12", "@storybook/react": "^3.2.12", From abf2aafc770168f73e11d9aef79c296a2eff4b98 Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Fri, 6 Jan 2023 12:34:49 -0500 Subject: [PATCH 19/21] [feature] Support for click event (mvieracanive) --- .npmignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.npmignore b/.npmignore index 4ccc9fd..dce77b7 100644 --- a/.npmignore +++ b/.npmignore @@ -3,12 +3,13 @@ examples/ .nyc_output/ coverage/ stories/ -sotrybook-static/ +storybook-static/ lib/*.js .github -.sotrybook/ +.storybook/ .babelrc .eslintrc +.eslintignore .gitignore .travis.yml postcss.config.js From 30ffa2d48a2073fa4415132590ee63e5e977170d Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Fri, 6 Jan 2023 12:37:11 -0500 Subject: [PATCH 20/21] [feature] Support for click event (mvieracanive) --- .npmignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index dce77b7..842f5f4 100644 --- a/.npmignore +++ b/.npmignore @@ -14,4 +14,4 @@ lib/*.js .travis.yml postcss.config.js rollup.config.js -webpack.config.js \ No newline at end of file +webpack.config.js From 23c4a3c5ca3caf23bb72a1683ec20da2820bbd64 Mon Sep 17 00:00:00 2001 From: Maia Viera Date: Fri, 6 Jan 2023 12:42:39 -0500 Subject: [PATCH 21/21] [feature] Support for click event (mvieracanive) --- lib/DatePickerItem.js | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/DatePickerItem.js b/lib/DatePickerItem.js index a7e0c63..3d32d24 100644 --- a/lib/DatePickerItem.js +++ b/lib/DatePickerItem.js @@ -11,9 +11,9 @@ const DATE_HEIGHT = 40; // 每个日期的高度 const DATE_LENGTH = 10; // 日期的个数 const MIDDLE_INDEX = Math.floor(DATE_LENGTH / 2); // 日期数组中间值的索引 const MIDDLE_Y = - DATE_HEIGHT * MIDDLE_INDEX; // translateY值 -const WHEEL_DELTA_Y = DATE_HEIGHT -const WHEEL_STOP = 200 -const CLICK_OFFSET = 111 +const WHEEL_DELTA_Y = DATE_HEIGHT; +const WHEEL_STOP = 200; +const CLICK_OFFSET = 111; const isUndefined = val => typeof val === 'undefined'; const isFunction = val => Object.prototype.toString.apply(val) === '[object Function]'; @@ -46,10 +46,10 @@ class DatePickerItem extends Component { this.currentIndex = MIDDLE_INDEX; // 滑动中当前日期的索引 this.moveDateCount = 0; // 一次滑动移动了多少个时间 this._moveToTimer = null; - this.wheelMoveTimer = null - this.wheelMoveStarted = false - this.wheelYOffset = 0 - this.clickOffset = 0 + this.wheelMoveTimer = null; + this.wheelMoveStarted = false; + this.wheelYOffset = 0; + this.clickOffset = 0; this.state = { translateY: MIDDLE_Y, @@ -61,8 +61,8 @@ class DatePickerItem extends Component { this.handleContentMouseDown = this.handleContentMouseDown.bind(this); this.handleContentMouseMove = this.handleContentMouseMove.bind(this); this.handleContentMouseUp = this.handleContentMouseUp.bind(this); - this.handleContentWheelMove = this.handleContentWheelMove.bind(this) - this.handleContentClick = this.handleContentClick.bind(this) + this.handleContentWheelMove = this.handleContentWheelMove.bind(this); + this.handleContentClick = this.handleContentClick.bind(this); } componentWillMount() { @@ -75,7 +75,7 @@ class DatePickerItem extends Component { viewport.addEventListener('touchmove', this.handleContentTouch, false); viewport.addEventListener('touchend', this.handleContentTouch, false); viewport.addEventListener('mousedown', this.handleContentMouseDown, false); - viewport.addEventListener('wheel', this.handleContentWheelMove, false) + viewport.addEventListener('wheel', this.handleContentWheelMove, false); } componentWillReceiveProps(nextProps) { @@ -208,7 +208,7 @@ class DatePickerItem extends Component { event.pageY; if (event.type === 'click') { - this.touchY = event.pageY + this.clickOffset + this.touchY = event.pageY + this.clickOffset; } this.translateY = this.state.translateY; @@ -224,11 +224,11 @@ class DatePickerItem extends Component { event.pageY; if (event.type === 'wheel') { - touchY = event.pageY + this.wheelYOffset + touchY = event.pageY + this.wheelYOffset; } if (event.type === 'click') { - touchY = event.pageY + this.clickOffset + (Math.sign(this.clickOffset) * -1 * WHEEL_DELTA_Y) + touchY = event.pageY + this.clickOffset + (Math.sign(this.clickOffset) * -1 * WHEEL_DELTA_Y); } const dir = touchY - this.touchY; @@ -256,11 +256,11 @@ class DatePickerItem extends Component { let touchY = event.pageY || (event.changedTouches && event.changedTouches[0].pageY); if (event.type === 'wheel') { - touchY = event.pageY + this.wheelYOffset + touchY = event.pageY + this.wheelYOffset; } if (event.type === 'click') { - touchY = event.pageY + this.clickOffset + (Math.sign(this.clickOffset) * -1 * WHEEL_DELTA_Y) + touchY = event.pageY + this.clickOffset + (Math.sign(this.clickOffset) * -1 * WHEEL_DELTA_Y); } const dir = touchY - this.touchY; @@ -292,21 +292,21 @@ class DatePickerItem extends Component { */ handleContentClick(event, direction) { if (this.animating) return; - this.clickOffset = CLICK_OFFSET * direction + this.clickOffset = CLICK_OFFSET * direction; - this.handleStart(event) - this.handleMove(event) - this.handleEnd(event) + this.handleStart(event); + this.handleMove(event); + this.handleEnd(event); } handleContentWheelMove(event) { - this.wheelYOffset += WHEEL_DELTA_Y * Math.sign(event.deltaY) + this.wheelYOffset += WHEEL_DELTA_Y * Math.sign(event.deltaY); if (this.animating) return; if (!this.wheelMoveStarted) { this.handleStart(event); - this.wheelMoveStarted = true + this.wheelMoveStarted = true; } if (this.wheelMoveTimer) { @@ -319,7 +319,7 @@ class DatePickerItem extends Component { ) if (this.wheelMoveStarted) { - this.handleMove(event) + this.handleMove(event); } } @@ -327,8 +327,8 @@ class DatePickerItem extends Component { this.wheelYOffset -= WHEEL_DELTA_Y * Math.sign(event.deltaY) if (this.wheelMoveStarted) { - this.wheelMoveStarted = false - this.wheelYOffset = 0 + this.wheelMoveStarted = false; + this.wheelYOffset = 0; this.handleEnd(event); }