Allow for the showing of only time field

Created on 17 May 2023, about 1 year ago
Updated 10 November 2023, 8 months ago

Problem/Motivation

I have a use case where I only need to show the time for a date range. I could preprocess and remove the date but having it part of the module makes it easier.

Steps to reproduce

Proposed resolution

* add a hide date field that only shows if a user selects "show time"

Remaining tasks

User interface changes

* Add a new field "hide date"

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States robpowell Boston

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

Comments & Activities

  • Issue created by @robpowell
  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Waiting for branch to pass
  • @robpowell opened merge request.
  • πŸ‡ΊπŸ‡ΈUnited States robpowell Boston

    I tested this as a view,

  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States robpowell Boston
  • Status changed to Needs work 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States shelane

    I'm setting this to needs work currently, but my inclination is to not include this. I would think that you would just select a different field formatter for the date range that would have this as it's not specific to AP style rules.

  • First commit to issue fork.
  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States kmonahan

    I also have a use case where I need this (showing an event time without the date). I still need the AP style rules for time display (e.g. a.m. not AM/am, 7 instead of 7:00, option to choose between 'to' and '-', handling of noon and midnight, etc.), so I'd rather use the time handling already in the module than create a separate field formatter. I rebased the previous MR against the latest in 8.x-1.x.

  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States kmonahan
  • Status changed to Needs work 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States shelane

    Fair enough. I took a look at it and the hide_date option is missing in the settingsForm for the ApStyleDateFieldFormatter. It's there in the ApStyleRangeFieldFormatter though.

  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    Waiting for branch to pass
  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States kmonahan

    Yes and looks like it was missing from the global settings too, so updated the MR to include both.

  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update 8 months ago
    Waiting for branch to pass
  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update 8 months ago
    Waiting for branch to pass
  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States shelane
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024