jQuery-Mask-Plugin icon indicating copy to clipboard operation
jQuery-Mask-Plugin copied to clipboard

How to change date format

Open cunhaTpires opened this issue 7 years ago • 1 comments

I'm using date mask $('#id').mask('00/00/0000', { placeholder: "mm/dd/yyyy", clearIfNotMatch: true, 'translation': { 0: { pattern: /[0-9*]/ } } });

My application understand dd/mm/yyyy. How to change mask to mm/dd/yyyy?

cunhaTpires avatar Dec 08 '18 12:12 cunhaTpires

The mask is only used for display (graphical), the parsing part has to be done in JS (you can use libraries like moment.js for that purpose). You mean that you want "dd" to be limited to 01-30/31 and "mm" to 01-12?

mhdaouas avatar Dec 08 '18 19:12 mhdaouas