ppresume / community

Discussions, feedbacks, roadmaps, community.
59 stars 3 forks source link

bug: PPMonthRangePicker got wrong state when startDate changed #25

Closed xiaohanyu closed 10 months ago

xiaohanyu commented 10 months ago

Description

When both startDate and endDate specified, and then startDate got changed, the state of PPMonthRangePicker would be wrong.

To Reproduce

Steps to reproduce the behavior:

  1. Go to resume form page
  2. Create an eduction item
  3. Specify startDate to dateA and endDate to dateB
  4. change startDate to dateC and make sure dataC is larger than dateB

Actual Behavior

There are at least 2 bugs:

  1. the MonthPicker for endDate has been reset to blank, however, sometimes the label still got floated
  2. the MonthPicker for endDate has wrong minDate property, it still has the value of dateA

Expected Behavior

  1. the MonthPicker for endDate should be reset to blank and label should not be floated
  2. the minDate property of the MonthPicker for endDate should be reset to dateC as well

[Optional] Screenshots

Desktop

https://github.com/ppresume/community/assets/1164623/3690d29c-7074-4868-b622-23500ad272e6

Smartphone

NA

Additional Context

This is a derived bug after we refactor the form with double buffering architecture.

xiaohanyu commented 10 months ago

Fixed:

https://github.com/ppresume/community/assets/1164623/d1f2a249-4805-4093-8717-af018da37e53