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.
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:
daySelected: 'background-primary text-white
seems to work, but typing into the input field no longer deselects the previously selected date.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