SolidOS / SolidOS/solid-ui

DateTimeField min and max datetime offsets

Offen
#136 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@timbl arbeitet bereits daran.

Seit 16.12.2019.

enhancement
Vorherrschende Sprache
TypeScript
Sterne
153
Forks
46
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
7

Beschreibung

User Story

As a Form Designer, I can optional set for the minimum and/or maximum datetimes based on an offset (in seconds) from now(), so I can define a valid datetime range around the current time.

Acceptance Criteria

  1. In a Form Model, the 'mindatetimeOffset' and/or 'maxdatetimeOffset' can be optionally defined for a DateTimeField. The offsets are specified in seconds.
  2. When the form is rendered, the valid date range is determined as:
    `(now - mindatetimeOffset) <= entered datetime <= (now + maxdatetimeOffset)
  3. If the entered datetime is outside of the valid datetime range, an error is displayed.

Example Form Model

ource: {Your WebID}

Dev Notes

  • If both a hardcoded and an offset datetime are provided (e.g., ui:maxValue and ui:maxdatetimeOffset), the hardcoded datetime takes precedence.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.