Problem with Dates

Ok, so browsing the documentation, I was presupposed that moment.js is the thing I need.
In my code, I converted the value on the datepicker element:

let selecteddate = $w('#targetschedule').value;
        let savethedate= moment(selecteddate, true).format("MMM DD, YYYY");

On the console, it gives the correct format:

I have this insert code:

let toInsert = {
            "title": $w('#projecttitle').value,
            "targetDate:": savethedate, ... etc

But when looking at the collection, the yellow icon is still there!
image

I feel like I’m missing something.
I have to go this way because there are values to insert on my content that comes from a selected dynamic page.