Different browsers have different mechanics for parsing dates, and based on the provided information, this seems to be causing the described behavior:
console.log(new Date(date.getFullYear(), date.getMonth(), date.getDate()));
You can also check what calling each of the getFullYear
If the issue persists, please send us an isolated runnable project or a StackBlitz demo (just the Calendar component, and the initial formattedDate array should be enough) where the problem can be observed, so we can investigate it further, and try to provide a solution that is best suitable to the specific use case. You can use the following online demo as a base:
Thank you in advance.
Progress is here for your business, like always. Read more
about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.