I am creating a datepicker range directive and would like to change the style in the range between the dates it contains in my model, for example between the date model.startDate and model.endDate I want to put a gray background, for this I am using the
month: {
content: '<div class = \' # = isBetweenDates(data)? "k-state-hover": "" # \ '> # = data.value # </ div>';
}.
My problem is the function .. it only fills my function when I create in the global object .. window.isBetweenDates = function (data) {....
In this case, if I use two directives .. the second will overlap the first one because it will overwrite the method, since it is in the global scope ..
Is there any way I can link that function with each scope directive that was created, so as not to impact each other? If there is more than one
I tried to make some forms, for example use $ compile and move to content but I can only pass string.
Thank You!!