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

Seeding Input Log Submit Button Enabled When Data Panel Date Field is Empty #38

Open
1 task
braughtg opened this issue Aug 27, 2024 · 0 comments
Open
1 task
Labels
bug Something isn't working

Comments

@braughtg
Copy link
Member

The Seeding Input Log "Submit" Button remains enabled even when the date field in the Data panel is blank.

The details of the issue are illustrated below:
(Submit button is enabled when the date field in the data panel is empty)
image

Steps to resolve the issue:
Within the seedingInput.html, the formNotCompetedFunction() Boolean computed function determines whether the submit button is enabled. This function checks whether certain fields are populated by checking their values against null, however the selectedDate value in not checked. This is probably because upon pageload, the selectedDate is set to dayjs().format('YYYY-MM-DD').toString() specified by the Data Vue property:

data:{
                sessionToken: null,
                selectedDate: dayjs().format('YYYY-MM-DD').toString(),
                selectedCrop: null,
                selectedArea: null,

This was done to prompt the user with the correct date format, but it leaves the date populated.

The issue can be resolved by checking if the selectedDate can be converted from a Unix timestamp into a date using the day.js library. This seems like an unnecessary step, but is required as you can individually set Month, Day, or Year in the date selector as demonstrated below:
image

issue will be resolved when:

  • Date selection field is required to be populated for submission button enabled.

Original issue by RolandLocke
Sunday Apr 30, 2023 at 22:28 GMT

@braughtg braughtg added the bug Something isn't working label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant