Perspective date time input - Can you add an option for current datetime?

I have a Perspective date time input with an onStartup script to give it the current datetime.

Would also like to have it zero the seconds if it can.

def runAction(self):
	from datetime import date
	self.props.value =

But manly I'd like the option to simply set it to the current datetime after the operator has set it to a few different dates.

Something like the "Today" option on the old MS Office DateTime Picker.

There is no need to import datetime

If you want a date to have zero seconds that can be accomplished.

self.props.value =,hour,minutes,seconds)

The other is not a terrible Idea, you should create an Ideas post.

1 Like

This seems to work:

def runAction(self):
	date =
	self.props.value =,,,0)

An expression binding of now(0) will run once on startup so you can use this in any of the date/time inputs to set the date. e.g.,


For your application you want something like,


1 Like