Adding 1+month to 01/10/2020 results in 31/10/2020 and not 01/11/2020

I’m creating a new thing and I’m passing a date picker input’s value with X months added.
So first item will be date+0month, 2nd item will be date+1 month, 3rd will be date+2mo… and so on.

due-date:

So when adding a thing with date as 01/10/20, I’m getting this result:

image

First item is correct (01/10/2020)
However, second item should be 01/11/2020

What am I doing wrong?

so it seems this issue happens because first date is being saved with 12:00am time. (so I’ve added 1hour to the due-date parameter):
image

and now it’s working as expected:
image

image
See the 1:00am in the db for the first entry?

now, why is this happening, and mostly important will I run into any issues in the future?

This topic was automatically closed after 70 days. New replies are no longer allowed.