Hi you all,
I am trying to convert a y/m/d format of a date to d/m/y format.
The date is passed by a page to a lightbox with itemData.
The lightbox gets the date, but doesn’t convert it to the options I would want it to display.
Does anyone have any idea why?
I tried to use “const” in stead of “let”, but no result neither.
function displayDate ( ) {
let receivedData = wixWindow . lightbox . getContext ()
let GotDate = receivedData . date
console . log ( GotDate ) //-> this receives the correct date, but y/m/d format
let options = { weekday : “long” , day : “numeric” , month : “short” , year : “numeric” } // That’s the format I would like it to display
let DisplayDate = GotDate . toLocaleDateString ( “nl-BE” , options )
console . log ( DisplayDate ) // → No result
}