Im using datepicker, but i would like to have a format 'DD/MM/YY'so I have this code:
$( ".datepicker" ).datepicker({
dateFormat: 'dd/mm/y',
changeMonth: true,
changeYear: true
});
But its not working, the format is appearing "MM/DD/YY". Also when a date is selected with datepicker the datepicker is not closed, do you know how to do that?
https://jsfiddle.net/g6ko3uqn/12/
HTML:
<form method="post" class="clearfix" action="" enctype="multipart/form-data">
<div class="form-row">
<div class="form-group col-md-6">
<label for="date" class="text-heading h6 font-weight-semi-bold">Date</label>
<div class="input-group date" data-provide="datepicker">
<input type='text' name="date" class="form-control datepicker" placeholder="DD/MM/YYY" id="datetimepicker1" placeholder="DD/MM/YYY" />
<span class="input-group-addon">
<i class="fa fa-calendar text-primary" aria-hidden="true"></i>
</span>
</div>
</div>
</div>
</form>