title: Format date on bootstrap datetimepicker
body: <p>I am using the Bootstrap 3 Date/Time Picker (<a href="https://github.com/Eonasdan/bootstrap-datetimepicker" rel="nofollow noreferrer">https://github.com/Eonasdan/bootstrap-datetimepicker</a>) and I have problems
  formatting the date</p>
  
  <pre><code>&lt;input type="text" id="fmEndDate" class="form-control input-sm"
                             datetimepicker
                             format="DD-MM-YYYY hh:mm"
                             ng-model="workRequest.EndDate"
                             placeholder="..."
                             name="fmEndDate"
                             required                               
                             ng-disabled="isDisabled"&gt;
  </code></pre>
  
  <p>But the value is being display as MM/DD/YYYY hh:mm AM</p>
  
  <p>i want 31-12-2017 23:59 for new year eve timestamp</p>
  
  <p>This is my directive</p>
  
  <pre><code>"use strict";
  angular.module("datetimepicker", [])
  .provider("datetimepicker", function () {
    var defaultOptions = { };
  
  this.setOptions = function (options) {
    defaultOptions = options;
  };
  
  this.$get = function () {
    return {
      getOptions: function () {
        return defaultOptions;
      }
    };
  };
  })
  .directive("datetimepicker", [
  "$timeout",
  "datetimepicker",
  function ($timeout,datetimepicker) {
  
    var defaultOptions = datetimepicker.getOptions();
  
    return {
      require : "?ngModel",
      restrict: "AE",
      scope   : {
        datetimepickerOptions: "@"
      },
      link : function ($scope, $element, $attrs, ngModelCtrl) {
        var passedInOptions = $scope.$eval($attrs.datetimepickerOptions);
        var options = jQuery.extend({}, defaultOptions, passedInOptions);
  
        $element
          .on("dp.change", function (e) {
            if (ngModelCtrl) {
              $timeout(function () {
                  ngModelCtrl.$setViewValue(e.target.value);
              });
            }
          })
          .datetimepicker(options);
  
        function setPickerValue() {
          var date = options.defaultDate || null;
  
          if (ngModelCtrl &amp;&amp; ngModelCtrl.$viewValue) {
            date = ngModelCtrl.$viewValue;
          }
  
          $element
            .data("DateTimePicker")
            .date(date);
        }
  
        if (ngModelCtrl) {
          ngModelCtrl.$render = function () {
            setPickerValue();
          };
        }
  
        setPickerValue();
      }
    };
  }
  ]);
  </code></pre>
  
  <p>Any ideas?</p>