Styling a CalendarView via code

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

Is there something I’m missing?

Using Haxe 4.0.5, HaxeUI-core {git] openfl 8.9.6

Can you attach a project? It might help a litte. The stylesheet for the calendar is here:

So those types of styles should work fine with it, if they arent working a minimal project would be good to understand whats going on.


Thanks Ian,

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…

haxelib name=“openfl”
haxelib name=“actuate”
haxelib name=“SVG”
haxelib name=“away3d”
haxelib name=“openfl-alivepdf”
haxelib name=“delay”
haxelib name=“haxeui-core”
haxelib name=“haxeui-openfl”

I doubt any of the libraries affect it, but i could be wrong, what if you add them one by one into the working project?

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 :blush:

It’s always the simplest things, but that had me stumped for a while.

Thanks for the help.

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.

Anyway, happy its all working for you!