Make the first line of the transform function be the log statement.
If there is something wrong with the creation of tmp you’d not get the following log statement. Though I would expect to see an error in openhab.log if that happened.
Which OH version are you running? There are lots of changes in OH 4 so the differences between M3 and M4 could be huge.
Are you sending a command to the Item? Updates do not propagate to the Thing so if you are merely updating the Item the transform wouldn’t be invoked because the update doesn’t go that far. It just changes the Item’s state.
After sending the command do you see anything else on that Item? A changed event perhaps? That shouldn’t matter but I’m trying to gather additional information to get a fuller picture.
Just to be clear, you are looking in openhab.log for the logs from your transform, right? They do not appear in events.log.
Since it seems to work with a String, is there a reason you can’t just use a String Item for this?
You are right - a datepicker is basically working with string items - but with some restrictions. So I decided to stay for the time being with your proposed workaround.
Nevertheless I think that it is worth to document that datetime with with js-transformation is not yet properly working in order to avoid that other people waste so much time on this issue as well.
I think that’s a symptom of a wider problem though, not an absolute problem. You should file an issue. It’s something that needs to be fixed, not documented.