【问题标题】:KendoUI DateTimePicker format UTC date integrating with Angular modelKendo UI DateTimePicker 格式 UTC 日期与 Angular 模型的集成
【发布时间】:2016-10-14 09:48:05
【问题描述】:

我的html页面中有这个

<input id="date" ng-model="config.selectedData.date" />

这在我的控制器中

$timeout(function () {
$("#date").kendoDateTimePicker({
    format: "yyyy-MM-dd hh:mmtt"
});
if ($("#" + key).data("kendoDateTimePicker") != undefined)
    $("#" + key).data("kendoDateTimePicker").readonly();
}, 50);

我的模型 $scope.config.selectedData.date = "0000-12-31T22:00:00.000Z"

我想看到类似:'1/1/0000 00:00'

但我看到:'Mon Jan 01 1 00:00:00 GMT+0200 (GTB Standard Time)'

【问题讨论】:

    标签: angularjs kendo-ui formatdatetime


    【解决方案1】:

    为此,请使用此库。

    http://momentjs.com/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多