hapijs / joi

The most powerful data validation library for JS
Other
20.95k stars 1.51k forks source link

feat: add 'today' to Date Validation #2935

Closed hng94 closed 10 months ago

hng94 commented 1 year ago

Issue now value is Date.now(), so it contains h, m, s, ms value in Date object. Hence, when users select Date only (without h, m, s, ms values), now value always greater than expected value (due to RTT from browser to server).

Feat This PR introduce today value, which setHours(0,0,0,0).

Test

Marsup commented 1 year ago

Thanks for the PR, but it's not that simple. See https://github.com/hapijs/joi/issues/980.

Marsup commented 10 months ago

Closing as it's unlikely to get merged in the current state.