Skip to content

fix: first time date picker on UTC mode #216

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elenitaex5
Copy link

This pull request refactors the src/datetime-picker.tsx file to improve code organization and functionality. The changes include restructuring imports for better readability, adding support for time zones, and ensuring proper handling of date and time operations using the dayjs library.

Code organization and readability:

  • Consolidated and reordered imports for better clarity, grouping related imports together [1] [2].
  • Moved utility functions (areDatesOnSameDay, dateToUnix, etc.) back into the main import block from ./utils for consistency.

Time zone and date handling:

  • Updated the logic in the DateTimePicker component to handle time zones more robustly by using dayjs.tz when a time zone is provided, or defaulting to UTC when specified.

@MLS535
Copy link

MLS535 commented Jul 24, 2025

@farhoudshapouran this pr would be great if you could check it...

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.

2 participants