Bug with date field when included in a structure field

Hi,

I think I found a bug with the calendar field when it’s included in a structure field.

If I choose a date in the calendar, the right date is displayed in the date field but when I click on the “tick” icon to close the sliding sidebar of the structure field then the date value is changed.

Bug reproduced with the Starterkit in the about page, Kirby 4.1.0 / PHP 8.3.3
I just added this code in the about blueprint:

          f_primary_approval:
            label: Primary approval
            type: structure
            fields:
              f_s_title:
                label: Title
                type: text
              f_s_files:
                label: Egnyte files
                type: structure
                fields:
                  f_s_s_last_update_date:
                    label: Last update
                    type: date
                    display: MM/DD/YYYY
                    help: Click on the calendar icon

I did two screencasts to illustrate (expire in 2 days from today):
https://streamable.com/ol88w6
https://streamable.com/dmla76

If someone else confirm and can reproduce, I’ll open an issue on Github

I can reproduce but looks like it only happens when the display format is set.

Ok, I have opened an issue and added your observation. Thanks for doing the test :slight_smile: