cms
cms copied to clipboard
Date field input formats prematurely
Bug description
Using a date field prevents authors from pauses for more than ~1s while typing as a pause auto-writes the date.
Video bug report (ignore the cursor position in the video, that's an OS bug at my end!)
Like any text input, I expect to be able to complete my typing at my own pace. Any formatting of that date should occur only AFTER I've left the field. It may be useful to allow field config to never show the <v-date-picker component.
How to reproduce
Create a date field in a blueprint on a collection > create or edit an entry > attempt to use the date input (not the date picker).
Date field in blueprint:
-
handle: release_date
field:
mode: single
time_enabled: false
time_required: false
full_width: false
inline: false
columns: 1
rows: 1
display: 'Release date'
type: date
icon: date
width: 50
listable: hidden
instructions_position: above
`
### Logs
_No response_
### Versions
Statamic 3.2.37 Pro
Laravel 7.30.6
PHP 8.0.16
### Installation
Fresh statamic/statamic site via CLI
### Additional details
I'm in the UK and prefer to use ISO format (YYYY-MM-DD)
**`config/app.php`:**
`'timezone' => 'UTC',`
`'locale' => 'en',`
**`config/statamic/cp.php`:**
`'date_format' => 'Y/n/d',`
**`config/statamic/system.php`:**
`'date_format' => 'F jS, Y',`
#6560 has improved this a bit, but I still don't think it's great UX / a11y as it stands.
Could the formatting not be done once the field is no longer focused?
Same issue: Our clients are also failing with typing birthday dates.
https://user-images.githubusercontent.com/6337411/204225136-082a7a3f-5b7d-4bdb-b0e9-b8682809ce15.mov
Yeah I'm not sure why it needs to behave this way at all. Personally I think it should only format once you focus away from the field.
In #7753 the date field will only update when you're done.