Reset button doesn't show when field is set to Date only.

Created on 5 December 2021, about 3 years ago
Updated 30 November 2023, about 1 year ago

Problem/Motivation

I want to set my date field to NULL.

Steps to reproduce

  1. The module reset_date_field is installed and enabled.
  2. Go to a node
  3. Create a date field on a node
  4. Set it to "Date only"
  5. Go to "Manage form display" on the node
  6. For your date field set widget to "Reset date field widget"
  7. Go to create a node.
  8. What I see - No reset button shows.

Proposed resolution

Make the reset button show when the field is Date Only.

Remaining tasks

Make the reset button show when the field is Date Only.

User interface changes

N/A

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇦🇺Australia jaime@gingerrobot.com

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • 🇮🇳India adityarawat_ln

    Hi @jaimekristene

    please try above patch for the issue .

    thank you

  • 🇮🇳India adityarawat_ln

    Hi @jaimekristene,

    I wanted to follow up on the patch I provided for the reported issue. Could you please take a moment to test the patch and let me know if it resolves the problem you encountered? Your feedback is crucial to ensuring the stability and reliability of the module.

    Additionally, I'd appreciate it if the maintainer or any other contributors could review the patch when they have a chance.

    Thank you for your time and collaboration.

  • 🇮🇳India adityarawat_ln

    Hi @chandravilas could you please take a moment to review and test the patch in the context of the module? Your verification is crucial to officially closing this issue.

    Thank you

  • Merge request !2Update ResetDateFieldWidget.php → (Open) created by adityarawat_ln
  • 🇫🇷France mably

    @jaimegingerrobotcom I have created the DateTime Reset module that adds an option to DateTime widget field settings to display a reset button.

    It is compatible with Drupal 10 and 11 and works with Date, Date/Time and Date Range fields.

    The DateTime Reset module is heavily based on the DateTime hide seconds code for the third party settings part.

    For the "Reset" part, I had a look at the Reset Date Field module code, but chose a simpler, pure Javascript solution, without the Ajax command part.

Production build 0.71.5 2024