I have been trying to implement CalendarView in openfl via code, I can create the container and display it, and when I click a day it returns the correct date, although by default no text seems to be displayed?
However I’m at a loss getting it styled, trying to use a style doesn’t seem to do anything, no way to control fonts, fontsize etc
Tried a minimal project and yep, it works just fine, so now trying to identify why it’s not in the main project?
It’s a little difficult to attach the project as it has database links and won’t run elsewhere.
I have tried bypassing the app main and just drawing a calendarview, but still no text, not sure if it’s anything to do with the other libraries being used…
Finally tracked it down with a simplified project.
I couldn’t work out why even with the simple project it was working locally, but then the same issue on the server, until I noticed Haxeui creates a styles directory with CSS files when building the project, even when styling via code.
I had added Haxeui components to an exiting project, and typically all that is required is to re-upload the new js file, so I didn’t even consider rechecking newly created support files, doh!
As soon as I uploaded the styles directory the calendarview renders with text
It’s always the simplest things, but that had me stumped for a while.
OK, glad its working. Btw, i think its openfl that is creating that styles dir. Haxeui doesnt create any dirs at any point (in fact, there isnt really a build process for haxeui, just the build process of the host framework - openfl in this case i think).
You might need to reference your custom styles dir in your project.xml? Then maybe it will copy the relevant files there.