Proposal to delay datepicker template rendering.

I was wondering if it would be possible to delay the compilation of datepicker popup template until it is about to be displayed. The issue I had with instant compilation, is that when adding a bunch of datepicker popups on one page (8 in my case), page rendering lags visibly (~0.5 sec using eyeballing measurement, on a lower-end laptop). 

The way I implemented it seems to work for me, but it does break some of the tests. The commit below is merely a proposal to consider a (rather) minor optimization.