I've done another hack and bug fix (there were quite a bit of changes, thus i've uploaded the complete block with this post to facilitate users in their updating).
The block will automatically hide itself when the countdown date and time have been reached. This is achieved by calculating the difference in days, hours, minutes and seconds (set to 00) using the date difference class on phpclasses and checking if any of them are negative. A negative value will denote that the date have been reached.
If the result is negative, the block will set the configuration to hide the title and set the content as a blank string. This will effectively 'hide' the block from user view and will only be visible under the Editing mode.
A bug have also been fixed in the instance configuration template. Prior to the fix, all dropdowns for selection of date, month, year, hour and minute were "selected" in the HTML code. This causes the user to not have their previous saved configuration selected by default when they launch the instance configuration to amend, lets say the title only.
Mat also raised another problem of not being able to perform validation of the selected dates. I'm rather new to Moodle programming and I'll like to ask if there is a function to insert custom
javascript and
css spreadsheets in the configuration page from the block. This is because a simple javascript calendar and clock time selector can be used instead of drop-down selection to prevent input of illegal dates, but addition of additional scripts to the head of the HTML will be required.