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

"styles" configuration should not be used for internal lookup #189

Open
foobear opened this issue Apr 2, 2019 · 1 comment
Open

"styles" configuration should not be used for internal lookup #189

foobear opened this issue Apr 2, 2019 · 1 comment

Comments

@foobear
Copy link

foobear commented Apr 2, 2019

When using the styles configuration option, I have to be very careful to not break Rome internals.
Apparently, configured class names are also used for internal logic to find elements in the picker.

Examples:

  • space-separated strings
    Using Bootstrap 4 utility classes to define something like daySelected: 'background-primary text-white seems to work, but typing into the input field no longer deselects the previously selected date.
  • Using the same class name for multiple elements
    Applying color via dayPrevMonth: 'text-muted', dayNextMonth: 'text-muted' makes clicking a day in the next month actually select the day from the previous month.

I've created a pen for both: https://codepen.io/foobear/pen/NmqOGG

@knorthfield
Copy link

Adding classes to timeOption or dayBodyElem also disables ability to pick a date or time.

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
@knorthfield @foobear and others