rjsf-team/react-jsonschema-form

Format time in compliance with Draft 7

Open

#3.930 geöffnet am 30. Okt. 2023

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (2.136 Forks)batch import
breaking changebughelp wanted

Repository-Metriken

Stars
 (13.175 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 17h) (32 gemergte PRs in 30 T)

Beschreibung

Prerequisites

What theme are you using?

mui

Version

5.13.0

Current Behavior

The WidgetTime currently outputs time in the format 20:20:39 without including a timezone offset

Expected Behavior

According to JSON Schema Draft 7 compliance, the WidgetTime should output time with a timezone to be considered valid. The time format should include a timezone offset, something like 20:20:39+00:00

Steps To Reproduce

Use the playground

{
  "title": "Date and time widgets",
  "type": "object",
  "properties": {
    "time": {
      "type": "string",
      "format": "time"
    }
  }
}

Environment

- OS: MacOS 13.2.1
- Node: v16.20.2
- npm: 8.19.4

Anything else?

A quick solution is to override WidgetTime with a custom one.

Contributor Guide