-
Notifications
You must be signed in to change notification settings - Fork 307
Date input range fixes #3244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Date input range fixes #3244
Conversation
…ata, added yesterday and today presets for date range, fixed presets start and end date
Evidence input default value
…s date is not available
|
@arefabouhamdan it looks like the only check failing is the formatting/lint check. If you run |
|
@arefabouhamdan for the timezone and off-by-one issues, can you share how you were seeing that show up? We've typically only seen it with users east of UTC line, so just want to make sure you had a good starting test that was failing and can confirm it works now both in that case, and in the west of UTC case |
|
@arefabouhamdan do you know why the default dates of the date input have changed? Below are current live docs and the preview docs from this PR: Current Docs
This PR
|


Description
This PR addresses several issues with the date input component, including timezone handling, default values, year selection, date range presets, and improved date boundary management.
Changes Summary
🐛 Bug Fixes
1. Timezone Fix
toISOString()which could cause timezone-related date shiftsdateToYYYYMMDD()inhelpers.jsto use local date components instead of ISO string conversion2. Default Value Fix
today(getLocalTimeZone())as the reference date3. Extra Day End String Fix
extraDayEndStringwas only calculated for range inputs, causing issues with single date inputsrangecondition check soextraDayEndStringis calculated for all inputs✨ New Features
4. Data-Driven Year Selection & Date Disabling
dataanddatesprops to extract available years from query datacalendarStartandcalendarEnd(withextraDayEndStringfor safety) to setminValueandmaxValue, which automatically disables dates outside the range5. New Date Range Presets
6. Improved Preset Calculations
referenceDatethat selects the appropriate reference pointtodayDateinstead ofcalendarEnd7. Enhanced Year Selection Logic
Checklist