const date = new Date(str.replace(/\S+/, m => m.split('.').reverse().join('-')));
const date = new Date(str.replace(/(\d+)\.(\d+)\.(\d+)/, '$3-$2-$1'));
const [ day, month, year, hours, minutes, seconds ] = str.split(/\D/);
const date = new Date(year, month - 1, day, hours, minutes, seconds);
const date = dayjs(str, 'DD.MM.YYYY HH:mm:ss').toDate();