DayPilot Pro uses a slightly different approach (compile + link) when registering the <daypilot-calendar> directive because the "replace: true" attribute used in the Lite version (which only uses link) was deprecated some time ago (it still works in AngularJS 1.4 though).
I'm not sure why you compile the template string manually instead of using the "template" property (but maybe it's just a stripped version of some more complicated logic). However, the problem seems to be that you compile it in a link function (that's the anonymous function you return in the compile function).