date_range_formatter_3309324_#30.patch 850 B

12345678910111213
  1. diff --git a/src/Plugin/Field/FieldFormatter/DateRangeFormatterRangeFormatter.php b/src/Plugin/Field/FieldFormatter/DateRangeFormatterRangeFormatter.php
  2. index 92ec640..4e843f0 100644
  3. --- a/src/Plugin/Field/FieldFormatter/DateRangeFormatterRangeFormatter.php
  4. +++ b/src/Plugin/Field/FieldFormatter/DateRangeFormatterRangeFormatter.php
  5. @@ -79,7 +79,7 @@ class DateRangeFormatterRangeFormatter extends DateTimeCustomFormatter {
  6. }
  7. if (!array_key_exists($delta, $elements)) {
  8. // No end date provided or end date equals start date use single formatting.
  9. - $single_format = $this->getSetting('single');
  10. + $single_format = $this->getSetting('one_day');
  11. $elements[$delta] = ['#markup' => \Drupal::service('date.formatter')->format($start_date, 'custom', $this->t($single_format))];
  12. }
  13. }