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>
When I select a date, I have this:
Now I want to display some data like this:
When I choose a date:
I don't know how can I do this ...? thank.
plnkr
+3
Mercer
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
Ved
source
to share