How to use the ng-devui/utils.formatDate function in ng-devui

To help you get started, we’ve selected a few ng-devui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevCloudFE / ng-devui / devui / common / date-pipe.ts View on Github external
transform(date: any, pattern: any): any {
    if (!date) {
      return;
    }
    return formatDate(date, pattern);
  }
}
github DevCloudFE / ng-devui / devui / data-table / tmpl / data-table-column-tmpl.component.ts View on Github external
date(item) {
    let pattern;
    if (this.extraOptions && this.extraOptions.dateFormat) {
      pattern = this.extraOptions.dateFormat;
    } else {
      pattern = this.extraOptions && this.extraOptions.showTime ?
      this.devUIConfig.datePickerCN.format.time : this.devUIConfig.datePickerCN.format.date;
    }

    return item ? formatDate(new Date(item), pattern) : '';
  }
  emitFilterData(filterData) {