I am trying to display and collect date is this format 'm/d/yyyy'
looking into document I tried constructing below code but it does not seem to work:-
document.addEventListener('DOMContentLoaded', function() {
var delems = document.querySelectorAll('.datepicker');
var dinstances = M.Datepicker.init(delems,'m/d/yyyy');
});
The out put I am getting is default and not the one I constructed.
Replace :
var dinstances = M.Datepicker.init(delems,'m/d/yyyy');
with:
var dinstances = M.Datepicker.init(delems, {format:'m/d/yyyy'});