首页 > 解决方案 > 如何在 angular-bootstrap-datetimepicker 中更改日期时间格式

问题描述

我是 Angular 新手,无法在日历模块中更改日期时间格式。我正在使用angular-bootstrap-datetimepicker. 基本配置如下

 <dl-date-time-picker 
    maxView="day" 
    minView="day" 
    startView="day" 
    minuteStep="5" 
    [(ngModel)]="selectedDate">
 </dl-date-time-picker>

想要从(EEEE, MMMM d, y, h:mm:ss a zzzz)格式更改为(yyyy/mm/dd)格式

标签: datetimeangular7date-formatng-bootstrapbootstrap-datepicker

解决方案


我认为您正在尝试更改输入框中显示的日期格式 - 使用https://dalelotts.github.io/angular-bootstrap-datetimepicker/directives/DlDateTimeInputDirective.html


推荐阅读