Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

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

Open
1 task
RolandLocke opened this issue Apr 30, 2023 · 0 comments · May be fixed by #240
Open
1 task

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

RolandLocke opened this issue Apr 30, 2023 · 0 comments · May be fixed by #240
Assignees
Labels
bug Something isn't working

Comments

@RolandLocke
Copy link

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.
@braughtg braughtg added bug Something isn't working Good Second Issue An issue that is a little deeper than a good first issue. labels May 4, 2023
@RolandLocke RolandLocke linked a pull request May 16, 2023 that will close this issue
@braughtg braughtg removed the Good Second Issue An issue that is a little deeper than a good first issue. label Aug 17, 2023
@DickinsonCollege DickinsonCollege deleted a comment from RolandLocke Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants