Date picker bug

Datepicker - We are able to replicate this:

Select a date of 8/18/2022 0:00:00 → in the controller it comes as 8/17/2022 20:00:00

i.e. 4 hours earlier than the time we selected - this is consistent and replicable.
likely a timezone issue

@salim @Salim_Ameur @anon15528774

you need to test it in a different timezone probably using VPN. we are in UAE timezone.

Hi @Jonathan_Lau1,

If you select 8/18/2022 0:00:00 in a GMT+4, it is 8/17/2022 20:00:00 in “absolute” (GMT 0), right?
So the absolute time value received by the controller looks good to me.

IMO that’s not correct. it should come in as what we select. if we select 8/18/2022 we are getting 8/17/2022, this doesn’t make sense. that means we have to manually add 4 hours from all forest admin date fields and convert the timezone?

btw the date field does not come with a TIMEZONE stamp, it is coming plain text. it doesn’t say it’s GMT 0

btw on the forest admin dashboard general settings - we have it set to GMT+4 - but still the date field is coming in as 4 hours before… it shoudl match GMT+4 no?

To be sure to understand the context.
Is your field type a Date or a DateTime?

{
field: “date of birth”,
description: “Click on the Month (e.g. February) select; Click on the Year (e.g., 2022) select; Select day”,
type: “Date”,
},

Ok, so I agree for Date fields we have an issue as there is no time/timezone notion involved.
The technical value sent to the controller should be “8/18/2022” nothing more.

To prevent potential breaking changes on other projects using this feature, I guess we won’t changes the value format and will send “8/18/2022 00:00:00” (with the time) as you expect.

Let me create a ticket to transfert to the team.

Here is the issue tracker to follow:

My bad, sorry I misunderstood what you did with this configuration.

Is this an input of a Smart Action Form?
If that’s so, the Date type is actually a full date.
You probably need to setup a Dateonly instead (cf. the input documentation: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions/use-a-smart-action-form#handling-input-values)

1 Like

Hello @Jonathan_Lau1,

Have you been able to check Arnaud’s message sent a few days ago?
Would you keep us posted?

Thanks!

I believe this is resolved no?

Well @Jonathan_Lau1, you tell us if it is on your side :slight_smile:

Ok then I guess it’s resolved.
Thanks!

1 Like