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

Expose Date instead of Dayjs instance #2721

Open
vasilii-kovalev opened this issue Jan 10, 2025 · 0 comments
Open

Expose Date instead of Dayjs instance #2721

vasilii-kovalev opened this issue Jan 10, 2025 · 0 comments
Labels
improvement Something that could be better

Comments

@vasilii-kovalev
Copy link
Collaborator

vasilii-kovalev commented Jan 10, 2025

Now

In some cases (like filter property in DatePicker component) a Dayjs instance is provided for end-users for dates filtering. It leads to the following problems:

  1. Necessity to learn a new syntax, even though the project may not use Day.js. For example, we use date-fns, which works with the native Date objects
  2. It exposes the implementation details. Each time the implementation (approach/library to work with dates) changes, it will be a breaking change for end-users

To Do

  1. Expose Date instead of Dayjs instance in all places end-users can use it. Since Dayjs is an implementation detail, which I talked about above, right now it will be a breaking change
@vasilii-kovalev vasilii-kovalev added the improvement Something that could be better label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something that could be better
Projects
Status: Backlog
Development

No branches or pull requests

1 participant