How to clear Date-Time Picker after each time it is used?

This is how I would do it.

  1. Create confirmation popup. Output from pop is true or false based on Yes or No reply. You'll have to message from the popup view to the calling view because popups have no way to reference outputs back to the view that called them (post) You don't have to use message if you're okay with using the Confirm Dialog as an embedded view and toggle visibility, instead of using it as a popup.

  2. Add your submit button with a call to the confirm popup.

  3. Add a message handler to the view's root container to receive the confirm message, write the tag, and reset the DTP.

def onMessageReceived(self, payload):
	# implement your handler here
	if payload['confirm']:
		date_to_write = self.getChild("DateTimePicker").props.value
		if date_to_write is not None:
			system.tag.writeBlocking()
		self.getChild("DateTimePicker").props.value = None
  1. Add an onStartup script to the root container to set confirm to false and DTP to today's date. (this doesn't seem to work all the time, so maybe just provide another button to set to today instead of doing it on startup.)