-
Notifications
You must be signed in to change notification settings - Fork 13
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
New travel calendar #753
Merged
Merged
New travel calendar #753
Conversation
This file contains 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
- Started working on new calendar.
…ndar # Conflicts: # packages/calendar/package.json # packages/filter/package.json
…ndar # Conflicts: # packages/calendar/package.json
…ndar # Conflicts: # packages/calendar/package.json
- Localize month picker button.
- Do not parse text input until length matches date format.
…ndar # Conflicts: # packages/calendar/package.json
Size Change: 0 B Total Size: 376 kB ℹ️ View Unchanged
|
…ndar # Conflicts: # packages/calendar/package.json
…nglish if omitted.
- Previous month stepper button is disabled if showing today's month.
…ering an earlier month will focus on today's month. - Entering a date with missing zeroes will now be reformatted to correct date format (if valid) on blur. - getDefaultLocaleForFormatting() can now return undefined, if no matching locale is found, instead of default sv. - parseLocalizedDateString() returns undefined if parse fails, instead of "Invalid date". This should be less error prone since type system will enforce null checks.
… multiple variants.
- TravelDateInput now takes up correct in-line size in DOM, even though the inputs are absolute positioned.
- Fix styling of table. - Change order of absolute positioned elements, so that tabbing works correctly again. - Add zIndex prop, since zIndex is now needed when DOM element order is correct for tabbing, but not for rendering order. - Reduce animation time, is now "fast".
… code that is just noise.
… code that is just noise.
- Make heading optional, and align absolute positioning properly when heading is missing. - Add separate z-index when calendar popover is not visible, so that z-index doesn't interfere when having multiple inputs. - Change selection highlight as per design.
mattias800
requested review from
nikteg,
yousiftouma,
AugustasFriend and
emilheldring95
July 4, 2024 09:35
mattias800
added
enhancement
New feature or request
minor
Increment the minor version when merged
labels
Jul 4, 2024
…ver. - Add stories with render prop examples. - Add `onHideCalendar` callback. - Fix comment typo. - Add `firstMonthInMonthPicker` and `numMonthsInMonthPicker` props.
yousiftouma
approved these changes
Jul 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
New components:
TravelDateRangeInput
Text inputs that shows an overlay with calendar when focused.
TravelDateRangeCalendar
Text inputs and calendar that are always visible.
New helper functions:
formatLocalizedDate(date, localeCode)
Takes a date object and formats it to standard date format for locale.
parseLocalizedDateString(dateString, localeCode)
Takes a string formatted by locale and parses it. Returns a Date object, undefined if it fails.
reformatLocalizedDateString(dateString, localeCode)
Takes an input string, parses it and reformats it according to locale.
Locale codes
Locale codes are strings, for example:
sv
(Swedish)da
(danish)nb
(Norwegian)de
(German)en-GB
(British english)