Displaying multiple data on my input

I have an input:

<div class="search-field search-field-date search-field-calendar ui-datepicker-calendar columns small-3">
    <input type="text" data-ng-model="goDate"
           placeholder="Date d'aller" data-mtx-datepicker data-mtx-maxdate="returnDate" data-mtx-time="horairesAller" />
</div>

      

enter image description here

When I select a date, I have this:

enter image description here

Now I want to display some data like this:

enter image description here

When I choose a date:

enter image description here

I don't know how can I do this ...? thank.

plnkr

+3


source to share


1 answer


Update your code and replace:

 $scope.today = function() {
    $scope.dt = new Date();
  };

With:
 $scope.dt = [];
  $scope.today = function() {
     $scope.dt[0] = 'DU:'
    $scope.dt[1] = new Date();
     $scope.dt[2] = 'JOURNEE'
  };

      



Inside HTML:

ng-model="dt"

      

+5


source







All Articles