Creating Custom Components for Perspective. Customizing Properties

I am developing a component for Ignition Perspective. I wanted to know how to format the props.json file to set to today's date.


I got that part. I am trying to set a default value for it, preferably for today's date.

You can't, via the props.json. Setting today's date would be a runtime value. You can do so in your actual component's frontend code.

1 Like

Okay if we can't set the current date, then I would like to know how to set it to a date. Just out of curiosity.

I think the point is to not set it at all. That is an operation that the designer arranges, using bindings or scripts. Your front-end code can (and should) use an internal default when nothing has been set.

1 Like

In theory, by adding a default key with a value in it. I'd expect an epoch milliseconds number to work if anything does, but I also don't think we test anywhere with providing a default for a date value property via the schema specifically because it almost never makes sense to do so.

1 Like