title: Change date format for ui datepicker (jHipster)
body: <p>I've generated a Spring Boot + Angular 1 based project in jHipster. I'm kind of newbie the Angular world. Everything works fine, but when I input the date using the provided UI datepicker (<a href="https://angular-ui.github.io/bootstrap" rel="nofollow noreferrer">https://angular-ui.github.io/bootstrap</a>), its format is yyyy-MM-dd, even if I've defined spanish to be my only language package (I would prefer it to be dd/MM/yyyy). That's the code snippet for the input:</p>
  
  <p><strong>regulation-version-dialog.html</strong></p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label class="control-label"
          data-translate="selfprotectionApp.regulationVersion.versionDate"
          for="field_versionDate"&gt;Version Date&lt;/label&gt;
      &lt;div class="input-group"&gt;
          &lt;input id="field_versionDate" type="text" class="form-control"
              name="versionDate" uib-datepicker-popup="{{dateformat}}"
              ng-model="vm.regulationVersion.versionDate"
              is-open="vm.datePickerOpenStatus.versionDate" /&gt; &lt;span
              class="input-group-btn"&gt;
              &lt;button type="button" class="btn btn-default"
                  ng-click="vm.openCalendar('versionDate')"&gt;
                  &lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;
              &lt;/button&gt;
          &lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here there's the <code>{{dateformat}}</code> binding, but I don't know where jHipster picks it from. The only matches are in the date-util.service.js file, but changing the format here doesn't seem to affect.</p>
  
  <p><strong>date-util.service.js</strong></p>
  
  <pre><code>(function() {
      'use strict';
  
      angular
          .module('selfprotectionApp')
          .factory('DateUtils', DateUtils);
  
      DateUtils.$inject = ['$filter'];
  
      function DateUtils($filter) {
  
          var service = {
              convertDateTimeFromServer: convertDateTimeFromServer,
              convertLocalDateFromServer: convertLocalDateFromServer,
              convertLocalDateToServer: convertLocalDateToServer,
              dateformat: dateformat
          };
  
          return service;
  
          function convertDateTimeFromServer(date) {
              if (date) {
                  return new Date(date);
              } else {
                  return null;
              }
          }
  
          function convertLocalDateFromServer(date) {
              if (date) {
                  var dateString = date.split('-');
                  return new Date(dateString[0], dateString[1] - 1, dateString[2]);
              }
              return null;
          }
  
          function convertLocalDateToServer(date) {
              if (date) {
                  return $filter('date')(date, 'yyyy-MM-dd');
              } else {
                  return null;
              }
          }
  
          function dateformat() {
              return 'yyyy-MM-dd';
          }
      }
  
  })();
  </code></pre>
  
  <p>Of course, I could replace the <code>{{dateformat}}</code> expression by some date format in HTML, but I would like to do it for the whole project.</p>