Confused

I'm due on the 31st the other day I did my ovulation test even though I had ovulated earlier doctor confirmed this on a scan as I had a maturing egg at the time of scan ( looking into fertility problems) anyway I decided to do a test and it looks

positive but how can it be ?? And also got a negative next morning 🙄😩🙈 please help