You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In elements.js, I'm testing duration as a dateType with the regular expression as /^PT[\d]{1}H/i and using <time datetime="PT2H"/>. However, the input type is still identified as "date" rather than "duration", and I was unsure as to why seeing that date's regular expression is /^[Y\d]{4}-[M\d]{2}-[D\d]{2}$/i. My understanding is that the input type is set only by checking against the dateTypes set, but let me know if there is an additional place I need to look. Thanks!
Firstly, you can simplify the regex to /^PT\dH/i ({1} is implied, and [\d] is the same as \d). Furthermore, you can probably simplify it further to /^PT/`, since no date format starts with PT (and assuming it starts with hours, and a 0-9 number of hours at that, will make you lose some).
Apart from that, indeed it should be recognized with the test string you give. I wonder if something more significant is at play, like a failing build or running off remote Mavo or something like that?
If a
<time>
'sdatetime
attribute is a duration, an appropriate editing widget needs to be used. Currently, it will incorrectly be a date input.The text was updated successfully, but these errors were encountered: