Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
21.79k stars 1.49k forks source link

Time Picker Component "time only" does not work as expected #14462

Closed timtandio closed 4 days ago

timtandio commented 2 weeks ago

Checklist

Hosting

Describe the bug The Time Picker component does not work; it keeps asking for a valid date even though the 'time only' option is checked. It ask for a valid date when we try to save the form.

To Reproduce Steps to reproduce the behavior:

  1. create date/time component
  2. check show time, time only and ignore timezone
  3. see error below

Screenshots image image image image image

linear[bot] commented 2 weeks ago

BUDI-8593 Time Picker Component "time only" does not work as expected

andz-bb commented 1 week ago

hey @timtandio, which datasource are you using here?

timtandio commented 1 week ago

hi @andz-bb please see this file export. thank you test-export-1725471867558.tar.gz

ConorWebb96 commented 1 week ago

Hey @timtandio,

I'm not receiving any errors after importing your app. Looking at the app it seems like you are on quite an older version of Budibase. What version are you using?

Have you also tried exporting and reimporting to see if that fixes your error?

I recommend updating to the latest version and trying again.

If possible can you provide a more simple replication app showing the error.

timtandio commented 1 week ago

Hi @ConorWebb96 ! Please see the video below. I have updated it to the latest version and tried to import and export the file, but the problem still persists. Even after I removed the validation condition, it is still showing me an error.

https://github.com/user-attachments/assets/b940abec-7566-4dd6-87f1-1d7e21987425

ConorWebb96 commented 1 week ago

Hey @timtandio,

I believe I've found the issue. For whatever reason the field you have in your form is sending up a value that looks like this. arrivaltime: "09:27" What it should be sending up is: "2024-09-06T11:00:00.000Z" which is just the current time that was set in the time only field. (The date is ignored for this field, it just defaults it to today.)

I believe the 09:27 time was how it was previously saved in earlier versions of Budibase.

Now with the above said the only way I was able to fix this was to create a new form that stores this value correctly in the database. Copy the new field after configuring them as time only etc and paste them in to your form to replace your fields that are causing the errors.

For whatever reason deleting and re-adding the fields to the same form doesn't resolve this, it preserves the bad formatted value thats sent up to the database.

Going to accept this as others are likely to run into the same issue.

Thanks for sending the app across + video.