The iframe sandbox attribute

The "Get date and time" button will run a script in the inline frame.

Since the sandbox attribute is set, the content of the inline frame is not allowed to run scripts.

You can add "allow-scripts" to the sandbox attribute, to allow the JavaScript to run.