Skip to content

Commit

Permalink
Updates DatePicker style so helper text does not shift
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviawongnyc committed Nov 28, 2023
1 parent 639b867 commit eee227f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
- Updates the following components to accept `JSX.Element` type values into their `"headingText"` prop: `AlphabetFilter`, `AudioPlayer`, `ComponentWrapper`, `SearchBar`, `VideoPlayer`
- Updates the `Notification` component to accept `JSX.Element` type values into its `"notificationHeading"` prop.
- Updates the `StructuredContent` component to accept `JSX.Element` type values into its `"headingText"` and `"calloutText"` props.
- Adds z-index to the `DatePicker`'s calendar container so that the helper text does not shift when the calendar opens.

## Fixes

Expand Down
8 changes: 4 additions & 4 deletions src/components/DatePicker/DatePicker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import Table from "../Table/Table";

# DatePicker

| Component Version | DS Version |
| ----------------- | ---------- |
| Added | `0.24.0` |
| Latest | `2.1.1` |
| Component Version | DS Version |
| ----------------- | ------------ |
| Added | `0.24.0` |
| Latest | `Prerelease` |

## Table of Contents

Expand Down
6 changes: 6 additions & 0 deletions src/components/DatePicker/_DatePicker.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
// Styles needed to override `react-datepicker` plugin styles.
.react-datepicker__tab-loop {
// Prevents the calendar from shifting any elements below it.
position: absolute;
z-index: 1000;
}

.date-picker-calendar {
font-family: var(--nypl-fonts-body);

Expand Down
9 changes: 9 additions & 0 deletions src/components/DatePicker/datePickerChangelogData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
import { ChangelogData } from "../../utils/ComponentChangelogTable";

export const changelogData: ChangelogData[] = [
{
date: "2023-11-28",
version: "Prerelease",
type: "Update",
affects: ["Styles"],
notes: [
"Adds z-index to calendar container so that helper text does not shift when calendar opens.",
],
},
{
date: "2023-10-26",
version: "2.1.1",
Expand Down

0 comments on commit eee227f

Please sign in to comment.