arqex / arqex/react-datetime

Using timeConstraints and defaultValue together

Open
#564 3 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
JavaScript
Stars
2k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

When using `defaultValue={new Date()}` together with `timeConstraints`
for example `timeConstraints={{ minutes: { step: 15 } }}`, then the time input minute increments are relative to the current clock time minutes.

I would like the minutes options to always be 0, 15, 30, and 45. But If I use defaultValue={new Date()}, then the minute options are based off the current clock time. For example if the current time is 16:01, then the minute options are 1, 16, 31, and 46

is there a way to force the minute options to always be relative to :00 instead of the minutes obtained from `defaultValue={new Date()}`?

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.