From 4ed2c386a80c18d17f073a79d886cf4095a54072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Mon, 30 Dec 2019 19:55:35 +0800 Subject: [PATCH] docs(abc:date-picker): update (#760) --- packages/abc/date-picker/date-picker.config.ts | 10 +++++----- packages/abc/date-picker/index.en-US.md | 4 ++++ packages/abc/date-picker/index.zh-CN.md | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/abc/date-picker/date-picker.config.ts b/packages/abc/date-picker/date-picker.config.ts index 04a5eca02..157dee4db 100644 --- a/packages/abc/date-picker/date-picker.config.ts +++ b/packages/abc/date-picker/date-picker.config.ts @@ -2,13 +2,13 @@ import { Injectable } from '@angular/core'; import { getTimeDistance } from '@delon/util'; export class DateRangePickerConfig { - nzFormat = 'yyyy-MM-dd'; + nzFormat?: string = 'yyyy-MM-dd'; nzClassName?: string; nzSize?: string; nzStyle?: string; - nzAllowClear = true; - nzAutoFocus = false; - nzDisabled = false; + nzAllowClear?: boolean = true; + nzAutoFocus?: boolean = false; + nzDisabled?: boolean = false; nzDisabledDate?: any; nzDisabledTime?: any; nzLocale?: any; @@ -17,7 +17,7 @@ export class DateRangePickerConfig { nzRenderExtraFooter?: any; nzPlaceHolder?: any; nzShowTime?: any; - nzShowToday = true; + nzShowToday?: boolean = true; nzMode?: any; nzRanges?: any; shortcuts?: DateRangePickerShortcut = { diff --git a/packages/abc/date-picker/index.en-US.md b/packages/abc/date-picker/index.en-US.md index 2e01ea11c..c4031b3d7 100644 --- a/packages/abc/date-picker/index.en-US.md +++ b/packages/abc/date-picker/index.en-US.md @@ -9,6 +9,10 @@ config: DateRangePickerConfig Based on the `nz-range-picker` further optimization, better service to start and end dates. +## Note + +If using date-fns, muse be modify the default `nzFormat` to` YYYY-MM-DD`. + ## API ### range-picker diff --git a/packages/abc/date-picker/index.zh-CN.md b/packages/abc/date-picker/index.zh-CN.md index eb76b4ad6..faa85c836 100644 --- a/packages/abc/date-picker/index.zh-CN.md +++ b/packages/abc/date-picker/index.zh-CN.md @@ -9,6 +9,10 @@ config: DateRangePickerConfig 基于 `nz-range-picker` 进一步优化,更好的服务于开始与结束日期。 +## 注意 + +如果采用 date-fns 务必修改默认 `nzFormat` 值为 `YYYY-MM-DD`。 + ## API ### range-picker