Skip to content

[bug]: Pattern attribute value \d{2}\:\d{2} is not a valid regular expression #1881

Open
@rktyt

Description

@rktyt

What version of design-system are you using?

2.0.0-rc.18

What's Wrong?

The browser reports an error with DateTimePicker and TimePicker.

Pattern attribute value \d{2}\:\d{2} is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /\d{2}\:\d{2}/v: Invalid escape

To Reproduce

https://design-system.strapi.io/?path=/docs/inputs-datetimepicker--docs
https://design-system.strapi.io/?path=/docs/inputs-timepicker--docs

Expected Behaviour

Invalid: <input pattern="\d{2}\:\d{2}">
Valid: <input pattern="\d{2}:\d{2}">

Metadata

Metadata

Assignees

Labels

issue: bugIssue reporting a bugstatus: confirmedConfirmed by a Strapi Team member or multiple community members

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions