formkit icon indicating copy to clipboard operation
formkit copied to clipboard

Datepicker doesn't accept ISO 8601 with colon in time offset

Open meixger opened this issue 2 years ago • 1 comments

Reproduction

https://formkit.link/0aa3abaef166adece938a6477f968539

Describe the bug

2023-01-01T11:00:00Z works ✅ 2023-01-01T12:00:00+0100 works ❌ 2023-01-01T12:00:00+01:00 fails with Error: Non ISO 8601 compliant date

FormKit datepicker Pro allows only Z as time zone designator or ±hhmm without colon as time offset.


ISO 8601 allow several time offsets (wikipedia):

  • Z
  • ±hh:mm
  • ±hhmm
  • ±hh

NB1: the time offset is validated against this regex: (Z|(?:\+|\-)[0-9]{4})?

NB2: somewhat related #675 Non ISO 8601 complient date when extra precision is given to datepicker PRO

Environment

Environment is not relevant to the issue.

meixger avatar Nov 21 '23 15:11 meixger

Thanks for the detail — we’ll get this sorted out

justin-schroeder avatar Nov 28 '23 15:11 justin-schroeder

This was fixed upstream in @formkit/tempo some time ago so should all be good to close here 👍

justin-schroeder avatar Jun 03 '24 18:06 justin-schroeder