Make WordPress Core

Opened 17 months ago

Last modified 17 months ago

#57753 new defect (bug)

Quickedit characters on date fields

Reported by: garbagedisco's profile garbagedisco Owned by:
Milestone: Awaiting Review Priority: normal
Severity: trivial Version: 6.1.1
Component: Quick/Bulk Edit Keywords: has-screenshots
Focuses: ui, javascript, administration Cc:


I know this isn't a massive issue as content editors should use their common sense, but it seems like a user can enter random characters into the date/times via quick edits

  • Select a post
  • Press ‘Quick Edit’
  • Try to insert letters, special characters in the ‘year’, ‘month’, ‘hour’, ‘minutes’ fields
  • Press ‘Enter’

Attachments (1)

57753-Quickedit-characters-on-date-fields.png (28.0 KB) - added by oglekler 17 months ago.
Result of submitting letters instead of numericals

Download all attachments as: .zip

Change History (2)

17 months ago

Result of submitting letters instead of numericals

#1 @oglekler
17 months ago

  • Focuses ui javascript administration added
  • Keywords has-screenshots added

I checked the described behavior and the result of usage of letters instead of digits is that document is getting current date and 00:00 time as a date. I suppose From a logical point of view, it is fine and there is no need to do addition checks or filtering on the backend.

This inconvenience can be fixed in the admin by two options:

  1. Change input types from text to number. But in this case, input is getting 'up' and 'down' arrows, and its appearance is changed. This change can be tricky to return to how it looks now.
  2. Stop adding letters through filtering keyboard's input in this input field and removing everything which is added but not digit.
Note: See TracTickets for help on using tickets.