How to send AngularStrap datepicker value without timezone?

前端 未结 3 1309
醉话见心
醉话见心 2020-12-24 05:17

I\'m wondering if it\'s possible to use AngularStrap\'s datepicker without it keeping the user\'s locale\'s timezone information. In our application we want to handle Contra

3条回答
  •  感情败类
    2020-12-24 06:20

    The "Angular way" is to use the $filter service to format the date returned by the datepicker.

    Example (HTML):

    {{inpDate | date: 'dd-MM-yyyy'}}
    

    Example (JS):

    $scope.processDate = function(dt) {
    return $filter('date')(dt, 'dd-MM-yyyy');
    }
    

    Plunker here

提交回复
热议问题