Skip to content

fix: Use refined dayjs parsing in date/time inputs - #8322

Merged
distantnative merged 11 commits into
v6/developfrom
v6/fix/dayjs
Aug 16, 2026
Merged

fix: Use refined dayjs parsing in date/time inputs#8322
distantnative merged 11 commits into
v6/developfrom
v6/fix/dayjs

Conversation

@distantnative

@distantnative distantnative commented Jul 25, 2026

Copy link
Copy Markdown
Member

Review

  • Design & concept
  • Rough pass
  • Manual testing

Timing: no rush

Description

Wrap-up of the dayjs work: this connects k-date-input/k-time-input to the new dayjs.parse() and fixes the input behavior that the old interpret() call could never get right. The inputs now read what you typed against the field's own display pattern.

Changelog

✨ Enhancements

  • Date and time fields show an example of their display format as placeholder, so the expected notation is visible before typing.
    https://feedback.getkirby.com/746
  • The display format of date and time fields supports escaped literals, e.g. HH[h]mm or D [de] MMMM YYYY

🐛 Bug fixes

Docs

display option (date, datetime, time fields)

Anything dayjs formats works, and
text you want printed as it is goes in square brackets:

fields:
  meeting:
    type: date
    display: D. MMMM YYYY
    time:
      display: HH[h]mm

For review team

@distantnative distantnative self-assigned this Jul 25, 2026
@distantnative
distantnative force-pushed the v6/fix/dayjs branch 3 times, most recently from 24eed60 to 9ca8e36 Compare July 26, 2026 13:14
@distantnative distantnative changed the title fix: the big dayjs overhaul lab: the big dayjs overhaul Jul 26, 2026
Comment thread panel/src/components/Forms/Input/DateInput.vue
@distantnative distantnative changed the title lab: the big dayjs overhaul fix: Use refined dayjs parsing in date/time inputs Jul 26, 2026
@distantnative
distantnative force-pushed the v6/fix/dayjs branch 3 times, most recently from 8a7961b to c2a9cf5 Compare July 26, 2026 13:33
@distantnative
distantnative changed the base branch from v6/develop to v6/fix/dayjs-5-pattern-parse July 26, 2026 13:33
@distantnative
distantnative changed the base branch from v6/fix/dayjs-5-pattern-parse to v6/fix/dayjs-5-locale July 26, 2026 13:33
@distantnative distantnative linked an issue Jul 26, 2026 that may be closed by this pull request
@distantnative distantnative mentioned this pull request Jul 26, 2026
3 tasks
@distantnative
distantnative force-pushed the v6/fix/dayjs branch 2 times, most recently from 72383fa to 981f08a Compare July 26, 2026 22:13
Comment thread panel/lab/internals/library.dayjs/1_dayjs/index.vue Outdated
Comment thread panel/src/libraries/index.ts Outdated
@distantnative
distantnative force-pushed the v6/fix/dayjs branch 2 times, most recently from a0a6389 to fa6aeae Compare August 3, 2026 16:13
Base automatically changed from v6/fix/dayjs-5-locale to v6/develop August 4, 2026 08:37
@distantnative
distantnative force-pushed the v6/fix/dayjs branch 4 times, most recently from 6aeac20 to 31c4e7e Compare August 9, 2026 16:42
@distantnative
distantnative marked this pull request as ready for review August 9, 2026 17:03
@distantnative
distantnative requested a review from a team August 9, 2026 17:03
@bastianallgeier

bastianallgeier commented Aug 15, 2026

Copy link
Copy Markdown
Member

It all works great and I love the placeholders. But there's a small tabbing bug, when I tab into the field with the custom strings …

CleanShot.2026-08-15.at.12.20.20.mp4

@distantnative

Copy link
Copy Markdown
Member Author

@bastianallgeier improved/fixed that behavior (and related general tab key behavior)

@bastianallgeier

Copy link
Copy Markdown
Member

It works great now and it's pretty mindblowing how great the usabilty of all of this now is 💛

One more thing. I've seen this example in the display tab, but it does not really change width at all. What is this supposed to do? Should the entire field width change or do I misunderstand it?

Screenshot 2026-08-15 at 15 33 19

@distantnative

Copy link
Copy Markdown
Member Author

Variable width here refers to the width of the month names. The display token is three characters wide but the actual display can vary in its length. I understand that it's confusing with not referring to the field width.

@bastianallgeier

Copy link
Copy Markdown
Member

Ahh, that makes total sense. Maybe we should rename the label to "Variable month name width". That also works like a charm btw. I would say that this PR is ready from what I've tested.

@distantnative
distantnative merged commit 586be08 into v6/develop Aug 16, 2026
10 checks passed
@distantnative
distantnative deleted the v6/fix/dayjs branch August 16, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment