How to add a trailing dot to Cleave.js date pattern (DD.MM.YYYY.)?
So valid input would be: 04.05.2023.
new Cleave('.my-input', {
date: true,
datePattern: ['Y', 'm', 'd'],
delimiter: '.'
});
// outputs: DD.MM.YYYY - without the final dot
2
Answers
I don’t think this is possible with only cleave.js.
Add a
'.'
to the end ofdatePattern
.