turn calendar into directive