Add option for custom date time format

Created on 18 February 2019, over 5 years ago
Updated 10 June 2024, 18 days ago

It would be nice to have an option to choose the output format of the displayed date field. As there is no way for this currently (this part is hard-coded), I added a small change to the module. It is however available only programatically by now.
If applied, one would be able to add an option '#custom_format' => 'd-m-Y H:i' for example(or any other supported format) and the date would be displayed as desired.

✨ Feature request
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡¬Bulgaria tzandev Sofia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands SpadXIII

    Found another bug where it would still validate when leaving the end-date empty.

    ps. an interdiff doesn't seem to generate : interdiff: Whitespace damage detected in input

  • πŸ‡³πŸ‡±Netherlands SpadXIII

    Found another small issue where it would strip the time from the entered values. And the end-value wasn't handled correctly.

    Here's a new patch.

  • Status changed to RTBC over 1 year ago
  • πŸ‡³πŸ‡±Netherlands idebr

    The new option to configure a custom format per field widget works as expected, thanks!

  • πŸ‡΅πŸ‡ΉPortugal jcnventura

    @idebr, Thanks for the review. Why did you hide the patch from #23 and #16. Are you saying the one you tested is the last one not hidden (#14) ?

    Please clarify and hide all files other than the one you tested, please..

  • πŸ‡³πŸ‡±Netherlands idebr

    I was unaware I changed the displayed patches. I tested the latest patch in #23.

  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • πŸ‡³πŸ‡±Netherlands idebr

    Attached patch implements the following changes:

    1. Applied default value formatting to single_date_time_timestamp_widget and single_date_time_widget
    2. Applied massageFormValues() to all widgets that extend SingleDateTimeBase
  • Status changed to RTBC over 1 year ago
  • πŸ‡³πŸ‡±Netherlands anneke_vde

    I tested patch #28, looks good the default_value formatting is now correct.

  • πŸ‡§πŸ‡ͺBelgium Chewi3

    Rerolled the latest patch for 2.0.0-beta2.

Production build 0.69.0 2024