I have installed the vue2-datepicker
component with npm install vue2-datepicker
(Reference: https://openbase.com/js/vue2-datepicker). All is good and the plugin is working nice. The problem I am facing is that the week number of a new year is considered to be the week where January 1st is. Currently that is not correct so I have tried to override the function that is calculating it.
I have tried several approaches:
export
the function try to edit it and export the component again
- Use
extend
and just create a function with the same name
import
the component and access its methods and assign the old function to new function
None of the mentioned approaches worked.
My question is: Is there a way to override a function that exist in a imported component located in node_modules
folder using VUEJS?
question from:
https://stackoverflow.com/questions/65843702/vuejs-override-function-from-node-modules-component 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…