I have a string with below date format
const strDate = '10-23-2022';
to convert this to date I was using below line of code
new Date(strDate);
this is all working fine in Chrome but the issue is in mozilla firefox I am getting invalid date error. So what is the correct way of converting string to date that works across all browsers?