2

so I am trying to bind value for input of type date..

Here is my AngularJS code that I am trying to bind the value to:

$scope.date = new Date();
$scope.dateString = dateFilter($scope.date,'dd-MM-yyyy');

And html:

<input class="date" type="date" ng-bind="dateString">

What I am trying to do, is I am trying to set default value to todays date. However, when I am loading my page, it just gives me following result:

<input class="date ng-binding" type="date" ng-bind="dateString">08-04-2015</input>

Any help will be more than welcome :)

Thanks, uksz

4

1 回答 1

0

You need to be using version 1.3 or higher for date support. you also want to use ng-model instead of ng-bind, because ng-bind is one way only

于 2015-04-08T16:17:02.443 回答