AngularJS 1.3 - Datepicker initial format is incorrect

前端 未结 2 2151
暗喜
暗喜 2021-02-12 11:25

I started using AngularJS 1.3 yesterday and one problem I have found is that the initial date in the Datepicker is not in the defined format. The format of the date is correct <

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-12 11:42

    app.controller("DatepickerDemoCtrl", function ($scope,$filter) { .. // $filter added
    
    $scope.today = function() {
        $scope.dt = $filter('date')(new Date(), $scope.format);
    };
    

    Please check with these three modifications.

提交回复
热议问题