-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[WEB-4841] chore: calendar component migration UI to propel #7730
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
Merged
sriramveeraghanta
merged 7 commits into
preview
from
chore-calendar-migration-ui-to-propel
Sep 9, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6eb39b5
chore: move calendar components and dependencies
anmolsinghbhatia 5c4ebd6
chore: update package configurations
anmolsinghbhatia 1bb49d5
chore: calendar import updated
anmolsinghbhatia af9eb16
chore: propel config updated
anmolsinghbhatia 953991e
chore: propel calendar code refactor
anmolsinghbhatia 8f51b2b
chore: code refactor
anmolsinghbhatia e2e899c
fix: build error
anmolsinghbhatia 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 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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { ComponentProps, useState } from "react"; | ||
| import type { Meta, StoryObj } from "@storybook/react-vite"; | ||
| import { Calendar } from "./root"; | ||
|
|
||
| type CalendarProps = ComponentProps<typeof Calendar>; | ||
|
|
||
| const meta: Meta<CalendarProps> = { | ||
| title: "Components/Calendar", | ||
| component: Calendar, | ||
| parameters: { | ||
| layout: "centered", | ||
| }, | ||
| args: { | ||
| showOutsideDays: true, | ||
| }, | ||
| }; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<CalendarProps>; | ||
|
|
||
| export const Default: Story = { | ||
| args: {}, | ||
| render: (args: CalendarProps) => { | ||
| const [date, setDate] = useState<Date | undefined>(new Date()); | ||
|
|
||
| return ( | ||
| <div className="p-4"> | ||
| <Calendar {...args} mode="single" selected={date} onSelect={setDate} className="rounded-md border" /> | ||
| </div> | ||
| ); | ||
| }, | ||
| }; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export * from "./root"; | ||
| export type { Matcher, DateRange } from "react-day-picker"; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| "use client"; | ||
|
|
||
| import * as React from "react"; | ||
| import { ChevronLeft } from "lucide-react"; | ||
| import { DayPicker } from "react-day-picker"; | ||
|
|
||
| import { cn } from "../utils"; | ||
|
|
||
| export type CalendarProps = React.ComponentProps<typeof DayPicker>; | ||
|
|
||
| export const Calendar = ({ className, showOutsideDays = true, ...props }: CalendarProps) => { | ||
| const currentYear = new Date().getFullYear(); | ||
| const thirtyYearsAgoFirstDay = new Date(currentYear - 30, 0, 1); | ||
| const thirtyYearsFromNowFirstDay = new Date(currentYear + 30, 11, 31); | ||
|
|
||
| return ( | ||
| <DayPicker | ||
| showOutsideDays={showOutsideDays} | ||
| className={cn("p-3", className)} | ||
| weekStartsOn={props.weekStartsOn} | ||
| components={{ | ||
| Chevron: ({ className, ...props }) => ( | ||
| <ChevronLeft | ||
| className={cn( | ||
| "size-4", | ||
| { "rotate-180": props.orientation === "right", "-rotate-90": props.orientation === "down" }, | ||
| className | ||
| )} | ||
| {...props} | ||
| /> | ||
| ), | ||
| }} | ||
| startMonth={thirtyYearsAgoFirstDay} | ||
| endMonth={thirtyYearsFromNowFirstDay} | ||
| {...props} | ||
| /> | ||
| ); | ||
| }; |
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.
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
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.
Uh oh!
There was an error while loading. Please reload this page.