converted calendar filter dialog templating functions to template.

keep it simple stupid.