DateTime selector date is jumping back 1 day on selecting a date

Using the datetime component, if I click on January 29th, it selects January 28th in the field value. I select a day and the previous date is entered. Our team has tried this in different timezones across the world and also with different chrome sensors and the result seems consistent.

How can I get it to stay on the selected date?

We are managing the timezone as specified in the docs using the moment-timezone lib.

Video of what is happening: https://drive.google.com/file/d/1gLn4dCETNv5TzLnBHuC78Mx84g_J21Lb/view?usp=drive_link

The exported json for this component looks like:

{
    "planned_for_date_time":{
        "id":"planned_for_date_time",
        "type":"widget",
        "uuid":"bf4d7765-cbd6-4d2b-81f8-b94013a14531",
        "style":{
        
        },
        "folder":"",
        "screen":null,
        "subtype":"DateTimeWidget",
        "tabIndex":null,
        "template":{
        "label":"Planned For",
        "value":"",
        "events":{
            
        },
        "hidden":false,
        "invalid":false,
        "loading":false,
        "maxDate":"",
        "maxTime":"",
        "minDate":"",
        "minTime":"",
        "disabled":false,
        "readOnly":false,
        "required":true,
        "_validate":false,
        "iconAfter":"",
        "labelWrap":false,
        "showClear":false,
        "textAfter":"",
        "dateFormat":"MMM d, yyyy",
        "iconBefore":"bold/interface-calendar",
        "labelAlign":"left",
        "labelWidth":"33",
        "marginType":"normal",
        "minuteStep":15,
        "textBefore":"",
        "timeFormat":"h:mm a z",
        "formDataKey":"{{ self.id }}",
        "tooltipText":"",
        "labelCaption":"",
        "showInEditor":false,
        "labelPosition":"top",
        "valueTimeZone":"{{ moment(self.value).tz(Prospect?.value?.timezoneName || \"America/New_York\").format('z') }}",
        "firstDayOfWeek":0,
        "formattedValue":"",
        "labelWidthUnit":"%",
        "manageTimeZone":true,
        "datePlaceholder":"{{ self.dateFormat.toUpperCase() }}",
        "displayTimeZone":"{{ moment(self.value).tz(Prospect?.value?.timezoneName || \"America/New_York\").format('z') }}",
        "timePlaceholder":"12:00 PM",
        "customValidation":"",
        "validationMessage":"",
        "hideValidationMessage":false,
        "maintainSpaceWhenHidden":false
        },
        "container":"",
        "createdAt":"2023-10-17T20:10:58.302Z",
        "namespace":null,
        "position2":{
        "col":9,
        "row":0,
        "width":3,
        "height":1,
        "tabNum":0,
        "rowGroup":"body",
        "container":"form2",
        "subcontainer":""
        },
        "updatedAt":"2024-01-27T11:17:42.865Z",
        "resourceName":null,
        "mobilePosition2":null,
        "mobileAppPosition":null,
        "resourceDisplayName":null
    }
}

Hi Leor_Alon

I think there's a bug related to the start date on datepicker - hopefully one of the retool engineers will pick this up and investigate it.

Also here:

and here:

Thank you for the report, @Leor_Alon! Added this as a bug internally and will keep this thread updated with a fix.

And thank you, @dcartlidge, for compiling the other threads and jumping in here! :hugs:

Any idea when we might see a resolution? We have not been able to get it to both work correctly and display a dynamic non UTC timezone simultaneously.

Thanks

Thank you for the context. I just checked in with the team about a resolution timeline! Will let you know :slight_smile:

@Leor_Alon, exciting news! The fix will be coming with our next Cloud release (which is usually sometime midweek) :slight_smile: :tada:

1 Like