Skip to content

Fix Post Date Block - Reverts to the default format when the custom date/time format input field is cleared.#64752

Open
rohitmathur-7 wants to merge 1 commit intoWordPress:trunkfrom
rohitmathur-7:fix/date-block-reverts-to-the-default-format-fix
Open

Fix Post Date Block - Reverts to the default format when the custom date/time format input field is cleared.#64752
rohitmathur-7 wants to merge 1 commit intoWordPress:trunkfrom
rohitmathur-7:fix/date-block-reverts-to-the-default-format-fix

Conversation

@rohitmathur-7
Copy link
Contributor

What?

Why?

  • The input field should remain visible when its value is cleared.

How?

  • Added checks so that the input filed remains visible when it is cleared.

Testing Instructions

  • Add the Date block to any post/page/template
  • Toggle the "Default format" off under Block settings.
  • Choose "Custom" from "Choose a format" dropdown.
  • Clear the pre-filled text from the format input field - either by selecting all and pressing delete or by deleting the characters one by one.
  • When the input field is cleared, now the input filed is still visible.

Screenshots or screencast

input-field
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @rohitmathur-7.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: rohitmathur-7.


To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Aug 23, 2024
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @rohitmathur-7! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@shail-mehta shail-mehta added [Type] Bug An existing feature does not function as intended [Package] Editor /packages/editor [Block] Post Date Affects the Post Date Block labels Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Post Date Affects the Post Date Block First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended

2 participants