If you were using the OU theme the answer would be yes, we have a dodgy global variable that does that.
I don't know whether you can also do it in standard Moodle. HOWEVER:
Is this the best way to do it anyway?
Wouldn't it be better to do something like...
1) when you know you're going to need to draw the dateselector, call require_js('either-my-new-js-file-or-an-existing-js-file-which-will-include-mine.js'); - if the header hasn't yet been printed, this will wait for the header to do it
2) the js file you require will include an onload handler that automatically goes and finds everything with the correct class= for date/time selectors, and sets up the necessary handlers then. [YUI library does both installing onload handlers, and finding items with a given class, for you.]