Skip to content

Course builder drip time changes when tabbing or clicking out of the time field #3478

Open

Description

@brianhogg

Reproduction Steps

  1. As an administrator, go to LifterLMS → Courses, open a course, and click Launch Course Builder.
  2. Add a lesson (or use an existing one) and click its Settings link to open the lesson settings panel.
  3. Under Course Drip Method, set Drip Method to On a specific date, pick a date, and set Time to 02:00 PM. Click Save.
  4. Click into the Time field, then press Tab (or click any other field).
  5. Click into the Time field again and click another field.
  6. Click Save, then reload the builder and open the lesson settings again.

Recording on dev (02:00 PM becomes 04:00 PM after Tab, 08:00 PM after clicking away, and 08:00 PM is saved):

Drip time changing on dev

Full-size video

Expected Behavior

Leaving the Time field without picking a new time keeps the time that was entered (02:00 PM).

Actual Behavior

The time changes every time focus leaves the field. With the builder on dev it can jump by several hours at once (02:00 PM → 04:00 PM → 08:00 PM), and the changed time is saved as the lesson's drip time. Times at 12 also flip between AM and PM (12:00 PM → 11:00 PM).

The quiz and assignment due time fields in #3446 use the same picker and the same h:i A format, so they are affected too (one hour earlier per Tab on that branch).

Technical Notes

  • The builder's date/time fields use the bundled xdsoft datetimepicker 2.5.18 (assets/vendor/datetimepicker/), added in 3.17.0. It bundles php-date-formatter 1.3.4.
  • With validateOnBlur (the picker's default), every blur parses the field's value and writes it back formatted. php-date-formatter 1.3.4 parses a 12-hour hour (h/g with A/a) as hour + meridiem offset - 1, so 02:00 PM parses as 13:00 and is written back as 01:00 PM; 12:00 PM parses as 23:00 and 12:00 AM as 11:00.
  • Upstream fixed this in kartik-v/php-date-formatter@7e5fa68 ("Fix Added recentrly changelog #12: Correct hour merdian validation", released in 1.3.5): hour % 12 === 0 ? offset : hour + offset.
  • On dev, the builder's onClose: function() { $input.blur(); } (assets/js/builder/Views/_Editable.js) makes one blur re-trigger the picker's blur handler about 900 times until RangeError: Maximum call stack size exceeded, and each pass shifts the time again, so the result looks random. Without the recursion (fixed in Fix 12-hour times shifting an hour in builder date pickers #3479), each blur moves the time back exactly one hour.
  • Date-only (Y-m-d) and 24-hour (H:i) formats are not affected.

System and Environment Information

System Report
N/A — reproduced on a wp-env site running LifterLMS `dev` (93fc28241) with SCRIPT_DEBUG on and off.

This issue has be recreated:

  • Locally
  • On a staging site
  • On a production website
  • With only LifterLMS and a default theme

Browser, Device, and Operating System Information

  • Chromium 148 (headless), Linux
  • Browser independent: the bug is in the bundled JavaScript date parser.

Activity

  1. moved this to Awaiting Triage in Developmenton Nov 12, 2026
  2. self-assigned this
    on Nov 12, 2026
  3. moved this from Awaiting Triage to In Progress in Developmenton Nov 12, 2026
  4. added 3 commits that reference this issue on Nov 12, 2026
    24ad19d
    21cf1ae
    ec10b93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions