I am using the bootstrap datepicker for angular but having issues with displaying the correct dateformat. The format I am getting now is: "2015-09-08T00:56:40.272Z". The format I want is dd-mmm-yyyy.
This is my datepicker:
<p class="input-group">
selected date:{{dt}}
<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt"
is-open="opened" datepicker-options="dateOptions"
date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" my-date/>
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open($event)"><i
class="glyphicon glyphicon-calendar"></i></button>
</span>
</p>
I tried this: Angular bootstrap datepicker date format does not format ng-model value.
But did not fix the issue. How can I get the right dateformat?