mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis92.github.io/angular-calendar/
MIT License
2.72k stars 863 forks source link

Allow Import of Util-Functions #1577

Open angelaki opened 2 years ago

angelaki commented 2 years ago

Is your feature request related to a problem? Please describe

I wanted to implement my own next / previous methods utilizing the addDaysWithExclusions functions. Somehow it doesn't work:

import { addDaysWithExclusions } from 'angular-calendar/modules/common/util'; Module not found: Error: Can't resolve 'angular-calendar/modules/common/util'

Describe the solution you'd like

Being able to use the util function for what reason ever

Describe your use case for implementing this feature

Custom Next / Previous methods on my component

Additional context

None

matts-bot[bot] commented 2 years ago

Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider sponsoring me

angelaki commented 2 years ago

In general I think it would be great to have methods next / previous on the components rather than putting the logic in the directive. The directive than could just trigger these methods. What do you think? I'd implement it, if you like the idea / will merge it.

Edit: thinking of it, it actually seams nicer to just modify this viewDate variable rather than binding to a component. Maybe both could be possible; this way it even wouldn't be a breaking change. Manipulation the variable or getting bould to the control. Both directive and control's method could use the same util function.