Skip to content
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

feat!: day-picker empty value #572

Merged
merged 1 commit into from
Feb 9, 2023
Merged

Conversation

vozbrann
Copy link
Contributor

@vozbrann vozbrann commented Feb 7, 2023

No description provided.

@vozbrann vozbrann requested review from vlacher12 and Yhuley February 7, 2023 16:31
@vozbrann vozbrann marked this pull request as ready for review February 7, 2023 16:31
@vozbrann vozbrann linked an issue Feb 7, 2023 that may be closed by this pull request
@vlacher12 vlacher12 requested a review from lazzystep February 8, 2023 11:03

const [isCalendarOpen, setIsCalendarOpen] = useState(false);
const [date, setDate] = useState<Date>(defaultDate);
const [dateTime, setDateTime] = useState(transformTime(new Date(date)));
const [date, setDate] = useState<Date | null>(defaultDate);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need date and dateTime?

I feel like it's a bit redundant, single date transformation would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lazzystep
The component is deprecated. Hopefully, it's the last change to it. The logic inside is hard to customize and maintain, so the suggestion is to leave it like it is

@vozbrann vozbrann merged commit 1233ff7 into master Feb 9, 2023
@vozbrann vozbrann deleted the feat/day-picker-empty-value branch February 9, 2023 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Impossible to have empty value in DayPicker
3 participants