How to set time in time input from block?

I want to use the Time input in both ways:

  1. user sets up the time as regular component and
  2. the app may change the time shown in the time input component from the blocks itself.

I am not finding a way to implement 2. Is it possible? How?