SolidOS / SolidOS/solid-ui

DateTimeField min and max datetime offsets

Open
#136 0 comments 0 reactions 1 assignee View on GitHub

@timbl is already working on this.

Since Dec 16, 2019.

enhancement
Dominant language
TypeScript
Stars
153
Forks
46
Avg merge
1d 8h
Merged PRs (30d)
7

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.