Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: calendar year select bug and change evnet bug #82

Closed
wants to merge 1 commit into from
Closed

fix: calendar year select bug and change evnet bug #82

wants to merge 1 commit into from

Conversation

magicianShiro
Copy link

calendar组件的年份选择的时候
例如,今年是2018年,能选择的最小年份是2008年,
然而当我选择2008年的时候,能选择的最大年份是2017年.

还有就是change事件会被触发两次

@codecov
Copy link

codecov bot commented Jul 26, 2018

Codecov Report

Merging #82 into master will not change coverage.
The diff coverage is 66.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #82   +/-   ##
=======================================
  Coverage   85.16%   85.16%           
=======================================
  Files         137      137           
  Lines        3937     3937           
  Branches     1121     1121           
=======================================
  Hits         3353     3353           
  Misses        557      557           
  Partials       27       27
Impacted Files Coverage Δ
components/calendar/Header.jsx 88.33% <100%> (ø) ⬆️
components/calendar/index.jsx 90.47% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1367cfc...cbdc66f. Read the comment docs.

@tangjinzhou
Copy link
Member

第一:为什么提交es和lib
第二:时间选择仅显示当前选中前后的最近N个年份
第三: 再次核对change事件问题 我没能复现该问题 https://codesandbox.io/s/j9ljozo19

感谢PR

@magicianShiro
Copy link
Author

是这样的..

  1. 提交es和lib是因为我想先用着fork的东西来着..
  2. 年份选择哪个,我刚刚也改错地方了. 我看到逻辑是生成当前年份的前后各10年, 比如现在2018年 生成的start和end分别是2008和2028, 但是最终能选择的年份是2008-2017 所以我才觉得有点问题..如果理解错了的话 抱歉了
  3. 点开codesandbox尝试change事件还是会触发两次, 控制台打印的是一次change触发的..
    使用的是chrome 67
    image

万分感谢作者这么晚还来看这个....叨扰了...

tangjinzhou added a commit that referenced this pull request Jul 27, 2018
@tangjinzhou
Copy link
Member

tangjinzhou commented Jul 27, 2018

参考 https://segmentfault.com/a/1190000000736629 提交pr
年份选择是没有问题的
change事件的确会调用两次,已修复 34f162
抱歉这个PR不能合并了,多谢反馈
周末会发修复版,如果着急使用,建议你直接在onChange中判断下值是否改变,不建议fork后改变源码的方式

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants