UI: date picker shared component should not use browser date as "today"
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 62
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
**Describe the bug in current situation**
The date picker shared component that we implemented shows "today" as selectable. However, the [Vuetify Date Picker component](https://vuetifyjs.com/en/components/date-pickers/) fetches "today" using the browser API; this means that if the browser is wrong (or spoofed), then "today" may appears to be selectable, but isn't. The browser date may be wrong if the user is in an earlier timezone than Pacific. The browser date may be spoofed by simply changing your OS date.
Admittedly, this is a Vuetify bug... well actually two bugs:
1. The Vuetify Date Picker should provide a way to specify "today" instead of assuming the browser API is correct/valid.
2. The Vuetify Date Picker should not appear to allow the selection of "today" if the specified date range excludes today, eg. if the date range is Apr 1-13 then it should not appear that I can select Apr 14.
I am reporting this bug for 2 reasons:
1. Reporting a Vuetify bug is a time-consuming process and would distract from current priorities. THIS ticket can report it.
2. We may be able to "not show current date" in the date picker, which would preempt this bug.
**Link bug to the User Story**
None.
**Impact of this bug**
A user may try to select "today" according to their timezone (not Pacific) or spoofed system clock, which won't work. (So the behaviour appears wrong but is actually safe.)
**Chance of Occurring (high/medium/low/very low)**
Easy to reproduce by changing my OS' timezone, or overriding the date.
**Pre Conditions: which Env, any pre-requesites or assumptions to execute steps?**
See description above.
**Steps to Reproduce**
See description above.
**Actual/ observed behavior/ results**
In the date picker, "today" is circled and appears selectable, but clicking on it and then clicking OK does not select it. If the user clicked on various dates other than today, the last-clicked date is the accepted one (not "today").
**Expected behavior**
If today appears selectable, then I can select it.
**Screenshots/ Visual Reference/ Source**
In this screenshot, April 14 totally looks selectable, but clicking it does not select Apr 14 (because the date range in only up to Apr 13):

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.