Skip to content

Conversation

@raduconst
Copy link
Contributor

I added the button to let the user go faster to the current day instead of having to use the
calendar. I tried to keep the same behavior of the Today button from Edit Flow → Calendar → Customizable calendar, where you can go to the current date with just a press of a button.

P.S. If this PR is accepted, the pot file needs to be generated again because there's a or word between the Change and Today buttons.

This is made to fix #176

@dchymko
Copy link
Contributor

dchymko commented Oct 31, 2019

Thanks for adding this!

I made a minor change to relocate the Today button beside the date field for better context

@GaryJones GaryJones changed the base branch from main to develop November 13, 2025 16:01
Add a "Today" button to the Story Budget page that allows users to
quickly jump to the current date without needing to use the date picker.

The button:
- Uses current_time() for timezone-accurate dates
- Preserves the user's existing "number of days" setting
- Uses a <button> element to avoid CSS conflicts with hidden inputs

Also improves the redirect by using wp_safe_redirect() with exit instead
of wp_redirect() with wp_die().

Fixes Automattic#176

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-Authored-By: Radu Constantin <raduconst@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@GaryJones GaryJones force-pushed the story-budget-today-button branch from e30020b to fda6229 Compare December 19, 2025 02:04
@GaryJones GaryJones requested a review from a team as a code owner December 19, 2025 02:04
@GaryJones GaryJones merged commit ddae3b1 into Automattic:develop Dec 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a "Today" button to the Story Budget

5 participants