How do I programmatically close webform by node date field? Background: 
I'm adding an events (custom content type) &amp; registrations feature to an existing drupal 8 website. My experience in drupal is pretty minimal. But I can find my ways around code.

These events can be conferences, seminars, training spanning 1-N days with N number of seats.

What I have got so far is creating content type &amp; referencing webform.

What I want
Ways to disable/close form before event starts or as per a date field (ie, registration will be disabled).

What I have found which looks pretty close to what I want

Disable (Close) webform form dynamically

Close a webform when total seats reach a maximum
I haven't tried this module, but you might look at "Scheduled Updates"

Here's a walk through:
https://www.mediacurrent.com/blog/scheduling-content-changes-drupal-8/