svelte-datepicker
svelte-datepicker copied to clipboard
Unable to apply custom styling
In the source code, there is an option to provide custom styling through the styling prop.
Unfortunately, there is no example of how to use it properly.
It always throws ctx[2].toWrapperStyle is not a function and from inspecting the source code, there is no .toWrapperStyle method defined.
Yeah I haven't quite documented this yet as it was a lift-and-shift of the old styling code which I didn't like.
You need to import and create this from the library:
https://github.com/beyonk-adventures/svelte-datepicker/blob/master/src/calendar-style.js
import { DatePicker, CalendarStyle } ...
and then pass the instance as the styling property.
Is it possible to extend this CalendarStyle to make it more customizable?
I want the calendar button to take 100% of the parent div, but this is not possible currently with the current implementation.
Absolutely, we're completely open to PRs which extend the styling.
Did anyone have a solution to how to style the component? importing CalendarStyle seems to break the page...