Klenkes Posted June 23, 2019 Share Posted June 23, 2019 This is a weird one... - This is a multilanguage website with PW 3.0.123 (but same problem with 3.0.98) - Default language is german, second language english. - Fieldtype Datetime As soon as I change the Date/Time Input Format to a german format (8. April 2019) the field on a page will only save the value if I set the backend language to german. If set it to english(my default) the field won't save the date! Either the field is empty or it defaults to todays date. (Depending on the setting of the field) It doesn't matter what picker is used. It doesn't matter if "Default to todays date" is set. It also happens on PW 3.0.98 It's a matter of backend language and custom input format. Am I missing something here... Edit: Why is it that as soon as you write the forum post you find a solution? If I leave the fieldsettings at default and only change Date Input Format Code to, lets say: d-m-Y it works. Still... weird. Link to comment Share on other sites More sharing options...
Edison Posted June 24, 2019 Share Posted June 24, 2019 Sometime ago I encountered a similar problem with datetime fields not saving in local language. I think the issue was on Date/Time Output Format Code (field's tab Details). While for default language it was ok to use PHP date format, for locale languages I had to change to PHP strftime format. Example: - default (English): F j, Y H:i T - locale (Italian): %e %B %G %H:%M I got the hint combining this old post with the note above Date/Time Output Format Code: "The date/time will be output according to the format below. This is automatically built from the date/time selections above, but you may change it as needed to suit your needs. See the PHP date function reference for more information on how to customize this format. Alternatively, you may use a PHP strftime format if desired for localization." Yes... a bit weird! ? I hope you can find it useful. 1 Link to comment Share on other sites More sharing options...
teppo Posted June 24, 2019 Share Posted June 24, 2019 Sounds like a bug – if you can reproduce this, please open an issue for it at https://github.com/processwire/processwire-issues/issues ? Link to comment Share on other sites More sharing options...
Klenkes Posted June 25, 2019 Author Share Posted June 25, 2019 22 hours ago, teppo said: Sounds like a bug – if you can reproduce this, please open an issue for it at https://github.com/processwire/processwire-issues/issues ? Just did that. https://github.com/processwire/processwire-issues/issues/914 1 Link to comment Share on other sites More sharing options...
Frank Vèssia Posted January 19, 2021 Share Posted January 19, 2021 I have this problem and I can confirm is the translation of the module the issue, it happens even in the default language, I tried to change the 2 main files for having the datepicker translated and it's not saving anything Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now