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

Suggestion. Improvements for the custom class names. #247

Open
o2sevruk opened this issue Apr 12, 2024 · 4 comments
Open

Suggestion. Improvements for the custom class names. #247

o2sevruk opened this issue Apr 12, 2024 · 4 comments

Comments

@o2sevruk
Copy link

o2sevruk commented Apr 12, 2024

I noticed a problem with custom classes. E.g. the plugin provides the ability to change classes using the CSSClasses parameter. But you can't add multiple classes. No, in some cases you can, but after that you will have problems. For example. I can change the dayBtn class like this:

CSSClasses: {
  dayBtn: 'class-1 class-2 class-3'
}

at first glance it works well, but when you select the date you will catch the error because the code is like this:

const arrowEl: HTMLElement | null = element.closest(`.${self.CSSClasses.arrow}`);

Instead of using classes, I suggest you use another attribute, e.g. data-arrow for functionality and keep the classes just for styling.

@uvarov-frontend
Copy link
Owner

That’s right, you can change one class to another, but not to several. It’s not provided for and shouldn’t work that way.

@jahaganiev
Copy link

Hey @uvarov-frontend - thanks for the reply!

At Preline we wanted to integrate your awesome datepicker plugin under third party libraries and would like to know if you have any roadmap to support TailwindCSS in future.

Cheers!
Jaha

@uvarov-frontend
Copy link
Owner

@jahaganiev Good afternoon.
I'll add this to my roadmap.

@jahaganiev
Copy link

Good Day @uvarov-frontend,

Our team created PR here regarding the above suggestion. Please have a look when you have time and let us know if you need any help with that.

Cheers!
Jaha

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

No branches or pull requests

3 participants