getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.27k stars 167 forks source link

Date field bug when display: YYYY #3234

Closed possible-is closed 2 years ago

possible-is commented 3 years ago

If i add display: YYYY to a date field and then try to enter a year manually (not via the date picker) into the date field in the panel, i get this response: "Cannot read property '0' of null"

As a suggestion i would recommend to just automatically pick the date 01.01. of that year.

If i change the display: YYYY to MM.YYYY the manual typing works again.

My version of kirby: 3.5.3

sboegel commented 3 years ago

same here! It would be great to have a date picker to select the year only for this purpose. My field definition:

fields:
   year:
        label: Jahr
        type: date
        display: 'YYYY'
        required: true
        calendar: true
        format: 'Y'
        translate: false
        step: year
        default: today
distantnative commented 2 years ago

✅ cannot reproduce this anymore with 3.6.2 (upcoming release)