bcgov / nr-fom

Forestry Operations Map
Apache License 2.0
0 stars 1 forks source link

End of Operations Year initial pick for the same year of Start of Operations shows wrong error message. #553

Closed ianliuwk1019 closed 8 months ago

ianliuwk1019 commented 9 months ago

Describe the Bug There is a bug on showing validation error message on "End of Operations" year . When adding a new FOM, picking a year from "End of Operations" field with the same year as "Start of Operations" field should not show message: "Must be equal to or later than the Start of Operations".

image.png

However, if user starts using date-Picker on "Start of Operations", the error message shows correctly:

image.png image.png

Switching "Start of Operations" back to 2024 and "End of Operations" back to 2024, it behaviors correctly.

image.png

Expected Behaviour The error message should only be shown when "End of Operations" year < "Start of Operations" year.

Steps To Reproduce

  1. Add new FOM.
  2. Pick first available Year from date-picker (the same as "Start of Operations" year).
  3. Error message shows.

Additional context

gormless87 commented 8 months ago

@ianliuwk1019 - this seems OK, except that the first time I select an end date equal to the start date, the error message briefly flashes then disappears.

ianliuwk1019 commented 8 months ago

Hi @gormless87 - thank you for verifying. Since main function is good, I will create a ticket for the minor initial date-pick slashing seen issue for this separately.

559