Is it possible to make the DateTime Picker in a connector default to the current time?
Hi Richard
Are you referring to the DateTime Picker of a 'write' parameter like below screenshot:
I believe it now initializes with the something around the time of Cube startup. Other setters typically take the current value of the linked read parameter as initial 'set' value.
Yes. That's correct. When we don't specify a default value, the timepicker will default to 1899-12-30 00:00. We had considered using a qAction to set a time parameter but I was wondering if there was a simpler method.
In my example, the time in the setter defaults to the Cube start-up time (visible in the screenshot of my reply, I did not make any selection yet). Can you maybe share your Cube version together with the parameter definition from your protocol either here in this dojo question or in a support ticket? Then we can take a closer look where the difference originates from.
Hi Richard,
Could you elaborate a bit more your use-case?
If you want to always display on the DateTime picker the current time, you could try to use a timer (e.g, every minute or x seconds) to trigger a QAction to update the value.
Kind regards