-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Marks holidays in the calendar #4203
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a6bb275
Initial code changes to add holidays to datePicker
tanmayIntelli fa93539
addressed review comments
tanmayIntelli 8f59c78
addressed review comments
tanmayIntelli 17a9b80
addressed review comments
tanmayIntelli b01667a
Addressing review comments
eeb6fc6
handling a case where multople holiday name are added for same date
7a25cb3
Added holiday in example
7fe8386
addressed review comments
1ffc924
trying to increase code coverage
f24f34f
Removed console log
a76b957
removed unnecessary commas
tanmayIntelli 94541fc
removing extra comma
tanmayIntelli 0368932
removed unnecessary commas
tanmayIntelli f15a608
removed unnecessary commas
tanmayIntelli cf498a3
Update index.js
tanmayIntelli 494e1c7
Update calendar.jsx
tanmayIntelli 1aa48c0
Update date_utils.js
tanmayIntelli 4d2511c
Update day.jsx
tanmayIntelli b64bc91
Update index.jsx
tanmayIntelli d5dccee
Update month.jsx
tanmayIntelli beb09b0
Update week.jsx
tanmayIntelli 778d182
Update date_utils_test.js
tanmayIntelli 6502b4a
Update day_test.js
tanmayIntelli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
() => { | ||
const [startDate, setStartDate] = useState(new Date()); | ||
return ( | ||
<DatePicker | ||
selected={startDate} | ||
onChange={(date) => setStartDate(date)} | ||
holidays={[ | ||
{ date: "2023-08-15", holidayName: "India's Independence Day" }, | ||
{ date: "2023-12-31", holidayName: "New Year's Eve" }, | ||
{ date: "2023-12-25", holidayName: "Christmas" }, | ||
{ date: "2024-01-01", holidayName: "New Year's Day" }, | ||
{ date: "2023-11-23", holidayName: "Thanksgiving Day" }, | ||
{ date: "2023-12-25", holidayName: "Fake holiday" }, | ||
]} | ||
placeholderText="This display holidays" | ||
/> | ||
); | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: This appears to return an array of size 1, that includes the className. I just want to confirm that this is intentional, as the comment above the function is not explicit about returning an array.
🔹 Bug (Nice to have)
Luciano C
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this is intentional. I have updated the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Thanks for updating the comment 👍
Luciano C