You're attempting to parse a non-ISO 8601 date string. According to the dayjs docs:
For consistent results parsing anything other than ISO 8601 strings, you should use String + Format.
The following should work.
var customParseFormat = require('dayjs/plugin/customParseFormat')
dayjs.extend(customParseFormat)
...
cy.get("#eff-date")
.invoke('text')
.then(()=>{
// Have to pass the custom parsing format, which is MM and not MMM
const edate = dayjs(text.split(':')[1], 'DD-MM-YYYY');
// To display, we have to use dayjs.format()
console.log(edate.format('DD-MMM-YYYY');
})
More information on using the String + Format (and customParseFormat) here