angular-calendar icon indicating copy to clipboard operation
angular-calendar copied to clipboard

Allow Import of Util-Functions

Open angelaki opened this issue 3 years ago • 2 comments

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

angelaki avatar May 11 '22 15:05 angelaki

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

matts-bot[bot] avatar May 11 '22 15:05 matts-bot[bot]

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.

angelaki avatar May 12 '22 11:05 angelaki