foundation-datepicker
foundation-datepicker copied to clipboard
Date format dd.mm.yyyy. doesn't display last dot.
If you set date format like "dd.mm.yyyy." when you select date it will not display last dot (after year) in date string.
To fix this you need to add one line in foundation-datepicker.js on position 1331 before return date.join(''):
formatDate: function(date, format, language) {
....
for (var i = 0, cnt = format.parts.length; i < cnt; i++) {
if (seps.length)
date.push(seps.shift())
date.push(val[format.parts[i]]);
}
date.push(seps.shift());
return date.join('');
},
I didn't test this for formats with minutes and seconds but it should work.
This also impacts any format that doesn't end with a format code placeholder, e.g. parenthesis.