Custom component showing different date that what was picked

I have a date picker and a field in a custom AI component that shows the information that’s on the column where the date picker anotates. I don’t know if it has to do with the AI, with timezones or what issue, but whenever I pick a date it shows another completely different one.


Here’s my date picker


Here’s the column it writes to (I have tried both respecting timezones and not doing so)


Here’s the custom component, note that it shows 20 nov 2024, although the column clearly indicates 11/21/2024.

It’s the same date using different display formats. Try adjusting the language/regional settings in your browser.

Sorry I don’t understand, the issue is my browser? What can I do if my clients are the one who use the app and not me? Is there not a way within glide where I can make adjustments so the shown date is exactly what they chose and in their timezone?

Found a solution. I realized that if I used the date picker instead of date and time picker, it always picked the hour at T00:00:00.000Z which is what brought me issues. I added a math column and added 0.2 hours so it would not be in midnight and is now showing the correct date.

That is exactly what should happen. Dates and times should be shown respecting each users language/regional settings.

ah, my apologies. I missed that it was showing as two different dates.
Question: do you have the “Respect Time Zones” option selected on the date column?

Hola Valeria!

As Darren advised you, it is a good practice use “Respect Time Zones” option in your Date column to avoid issues with date/time from several devices.

I have an AI component similar to yours. I initially had the same problem you describe, but a modification to my prompt fixed it. Here you can see some of my instructions to fix my date/time problem.

Saludos!

1 Like

Hi, yes, as I stated previously I tried both using respect time zones and without it and both gave me the same issue.

If you use a normal component to display the date, let’s say a text component, what does it show?

Well I don’t really use this values from glide tables but instead I create a json in glide, call an endpoint and store the values in a database. However, when I display the date from one of the tables of that external database, sometimes it shows the right date, sometimes it shows the previous day and sometimes it shows the next day. It’s an issue I’ve been having and can’t solve yet.

As I said, I’ve tried both with and without the option of respecting timezones and in both I get the same issue.

Kind of another topic, but while I understand that dates and times are shown respecting each user regional settings, it also brought me many errors back when I used the glide tables. My computer language is in English, but most of my clients have their computers in Spanish. When I stored a date as 10/7/2024 (October 7th), the dates displayed would show my clients July 10th.

What do you mean by “call an endpoint and store the values in a database”?

At the end of the day, you would still have it stored somewhere in Glide, right? Is it a datetime column, or a text column where you store the JSON?

You mentioned you used a datetime picker, so I thought it’s a datetime column. Hence the suggestion to display it using a text component to see what it shows.

I have a Glide table with a date column and other text colums, I create a JSON column to, well, create the JSON that stores all my data.

I use an api call to store the values in an external postgreSQL dabatase, which is connected to glide. I do so by calling an endpoint in an action where I pass my JSON data.

My external database saves the date in a timestamptz column.

The date is then shown on glide in a text component.

So you still have to input the data in Glide, then pass the data to your SQL database, then connect that SQL database to Glide and use it to display on the front end?

yup

Does it at least show correctly on your SQL database’s view?