Open
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
Member
|
@arefabouhamdan it looks like the only check failing is the formatting/lint check. If you run |
Member
|
@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 |
Member
|
@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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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