processwire-issues icon indicating copy to clipboard operation
processwire-issues copied to clipboard

FieldtypeDatetime translation breaks saving field

Open BernhardBaumrock opened this issue 11 months ago • 1 comments

Short description of the issue

I'm working on a Datetime related module and think I found a bug!

My user's language is german, I set the field input to this:

image

When showing an already populated field, it looks fine:

image

But when I change the time to this:

image

Which means "PM" in english and I save the page:

image

---> Data lost!

Expected behavior

Translations should not break the field functionality.

Actual behavior

All times without translated strings like "PM --> NACHM." work.

Setup/Environment

Field Settings

label Von
name from
id 102
type FieldtypeDatetime
flags 0
dateOutputFormat 'd/m/Y H:i:s'
inputType 'text'
dateSelectFormat 'yMd'
datepicker 3
dateInputFormat 'Y-m-d'
timeInputFormat 'h:i A'
columnWidth 33
collapsed 0
yearFrom 1925
yearTo 2045
yearLock 0
timeInputSelect 0
size 25
showAnim 'fade'
numberOfMonths 1
changeMonth 1
changeYear 1
showButtonPanel 0
showMonthAfterYear 0
showOtherMonths 0
htmlType 'date'
_lazy '1'
tags ''

PW Info

SERVER DETAILS ProcessWire: 3.0.243 PHP: 8.3.12 Webserver: Apache/2.4.62 (Debian) MySQL Server: 10.6.19-MariaDB-ubu2004-log MySQL Client: mysqlnd 8.3.12

BernhardBaumrock avatar Jan 06 '25 20:01 BernhardBaumrock

Actually @jmartsch shouldn't "AM" also be translated to "VORM." ?

BernhardBaumrock avatar Jan 06 '25 20:01 BernhardBaumrock