DateTimePicker not showing time in Linux but ok Windows and MacOS

This works fine on Windows and MacOS…I’ve tried Linux Mint and Ubuntu and get the same problem…the Month and Year show up with the DateTimePicker, but not the day or time. Here’s a screen shot showing what it looks like.

Screenshot 2024-06-12 at 2.16.21 PM

Anyone seen this and have a fix or suggestion. I want to use built in Xojo features, so please no plug-in suggestions.

Thanks in advance.

You have to resize the height of the control.

From the docs:
https://documentation.xojo.com/api/user_interface/desktop/desktopdatetimepicker.html

For Linux, the graphical display is the only option supported.

that’s why you need to resize the height of the control.

I have to say, this one is disappointing from a Multi-Platform standpoint. On the one hand, Linux only supports the graphical version which does look nice. But when I turn that on, Windows was only showing the non-graphical version with graphical display turned on. Yes, I can work around this, but it’s obvious I must handle each OS differently to get this working. I actually like the Graphical Display better, but that’s not consistent between the OSs :frowning:

Well that’s not Xojo’s fault. It is the differences that the operating systems bring with them.

1 Like

From the same docs:

GraphicalDisplay is not supported on Windows.

I always recommend the Einhugur Date and Time controls over the framework control. You’ll find cross-platform consistency there.

4 Likes

Thanks Tim, I will check this out!

I’m not sure I agree with that. Don’t get me wrong, I love Xojo and they do a great job. But they have to deal with OS differences on a regular basis. I think if third party plugins can solve the cross platform consistency with things like this, Xojo should be able to do the same. I realize they have priorities, I don’t think that blaming the OS for things like this makes sense. That’s my 2 cents.

2 Likes

It’s fairly possible Xojo uses the native controls and the plugin builds a custom one, achieving the same result on every OS.

Don’t forget – Listbox isn’t native for the purpose of being useful to us. BevelButton on Windows is custom for the purpose of cross platform matching. The point of a cross-platform framework is to abstract us from these differences.

1 Like

As I said before, going the native controls route is… interesting, but comes with costs. The multiplatform design system should allow multiple different UI native designs, one per platform, and the compiler should “compile” and cache all, but pick and build just the correct one for the current selected target. A MVC like design, the View is a “Native Window” with “Native Controls” sharing many common Models and Controllers (code, common blocks of logic for data and functionalities)
Xojo chose something in between, using native and trying to make’em fit by force, and that creates some problems like Listbox, needing not being native because it can’t, and also this inconsistency/bug in the Linux DateTimePicker causing a visual useless aberration for that platform. So the same route Xojo took for ListBox should be repeated there. The path Xojo chose, demands compatibility precedence over native controls to make them fit in a crossplatform way using the same screen real state and behavior. The Linux DateTimePicker is breaking this rule, layouts, screens and behaviors.

I’d tend to agree, up to a certain level. Of course, I like the concept of this abstraction, but I’d hate a Java-like environnement which doesn’t look native at all (like a fake menu bar on Mac and open dialogs). My experience with Java is dating, but I keep the bad feeling.