mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-23 18:20:36 +03:00
docs: update the disableDate doc
This commit is contained in:
+10
-1
@@ -25,7 +25,11 @@ Support to select a date range.
|
|||||||
|
|
||||||
### DisabledDate & DisabledTime
|
### DisabledDate & DisabledTime
|
||||||
|
|
||||||
Disabled part of dates and time by `disabledDate` and `disabledTime` respectively
|
Disabled part of dates and time by `disabledDate` and `disabledTime` respectively.
|
||||||
|
|
||||||
|
You should let the value of `defaultValue` not be disabled, when you use `disabledDate` or `disabledTime`.
|
||||||
|
|
||||||
|
The default value of `defaultValue` is `new Date().setHour(0,0,0,0)`.
|
||||||
|
|
||||||
<!-- Disabled -->
|
<!-- Disabled -->
|
||||||
|
|
||||||
@@ -39,6 +43,7 @@ Disabled part of dates and time by `disabledDate` and `disabledTime` respectivel
|
|||||||
### Shortcut
|
### Shortcut
|
||||||
|
|
||||||
You can set `shortcuts` to improve user experience.
|
You can set `shortcuts` to improve user experience.
|
||||||
|
|
||||||
Use the header slot or the footer slot to render extra element in panel for customized requirements.
|
Use the header slot or the footer slot to render extra element in panel for customized requirements.
|
||||||
|
|
||||||
<!-- ControlTimePanel -->
|
<!-- ControlTimePanel -->
|
||||||
@@ -46,6 +51,7 @@ Use the header slot or the footer slot to render extra element in panel for cust
|
|||||||
### Control TimePanel visible(datetime mode)
|
### Control TimePanel visible(datetime mode)
|
||||||
|
|
||||||
The display or hiding of the time panel can be controlled by `showTimePanel`.
|
The display or hiding of the time panel can be controlled by `showTimePanel`.
|
||||||
|
|
||||||
The time panel is displayed after the date is selected by default.
|
The time panel is displayed after the date is selected by default.
|
||||||
|
|
||||||
<!-- ControlOpen -->
|
<!-- ControlOpen -->
|
||||||
@@ -53,6 +59,7 @@ The time panel is displayed after the date is selected by default.
|
|||||||
### Control Open
|
### Control Open
|
||||||
|
|
||||||
You can use the prop `open` to control the visible of popup.
|
You can use the prop `open` to control the visible of popup.
|
||||||
|
|
||||||
This example shows how to close the popup when the seconds is selected.
|
This example shows how to close the popup when the seconds is selected.
|
||||||
|
|
||||||
<!-- HideSeconds -->
|
<!-- HideSeconds -->
|
||||||
@@ -60,6 +67,7 @@ This example shows how to close the popup when the seconds is selected.
|
|||||||
### Hide seconds selection & display AMPM selection
|
### Hide seconds selection & display AMPM selection
|
||||||
|
|
||||||
The columns of the time Picker is displayed according to the value of format(HH:mm:ss) by default.
|
The columns of the time Picker is displayed according to the value of format(HH:mm:ss) by default.
|
||||||
|
|
||||||
You can also set `showHour` `showMinute` `showSecond` to override the default value
|
You can also set `showHour` `showMinute` `showSecond` to override the default value
|
||||||
|
|
||||||
<!-- MinuteStep -->
|
<!-- MinuteStep -->
|
||||||
@@ -67,6 +75,7 @@ You can also set `showHour` `showMinute` `showSecond` to override the default va
|
|||||||
### Interval and custom time options
|
### Interval and custom time options
|
||||||
|
|
||||||
Set stepped time options by `hourStep` `minuteStep` `secondStep`
|
Set stepped time options by `hourStep` `minuteStep` `secondStep`
|
||||||
|
|
||||||
Set custom time options by `hourOptions` `minuteOptions` `secondOptions`.
|
Set custom time options by `hourOptions` `minuteOptions` `secondOptions`.
|
||||||
|
|
||||||
<!-- FixedTimeList -->
|
<!-- FixedTimeList -->
|
||||||
|
|||||||
+10
-1
@@ -25,7 +25,11 @@
|
|||||||
|
|
||||||
### 不可选择的日期和时间
|
### 不可选择的日期和时间
|
||||||
|
|
||||||
可用 `disabledDate` 和 `disabledTime` 分别禁止选择部分日期和时间
|
可用 `disabledDate` 和 `disabledTime` 分别禁止选择部分日期和时间.
|
||||||
|
|
||||||
|
当你使用`disabledDate` 或 `disabledTime`的时候, 应该设置`defaultValue`的值是不被禁止选择的.
|
||||||
|
|
||||||
|
`defaultValue`的默认值是`new Date().setHour(0,0,0,0)`
|
||||||
|
|
||||||
<!-- Disabled -->
|
<!-- Disabled -->
|
||||||
|
|
||||||
@@ -39,6 +43,7 @@
|
|||||||
### 快捷选项
|
### 快捷选项
|
||||||
|
|
||||||
可以通过设置 `shortcuts` 提升用户体验.
|
可以通过设置 `shortcuts` 提升用户体验.
|
||||||
|
|
||||||
也可以使用 slot header 或者 footer 去设置额外的元素.
|
也可以使用 slot header 或者 footer 去设置额外的元素.
|
||||||
|
|
||||||
<!-- ControlTimePanel -->
|
<!-- ControlTimePanel -->
|
||||||
@@ -46,6 +51,7 @@
|
|||||||
### 控制时间选择的显示和隐藏(日期时间模式)
|
### 控制时间选择的显示和隐藏(日期时间模式)
|
||||||
|
|
||||||
时间选择的显示可以通过 `showTimePanel` 控制.
|
时间选择的显示可以通过 `showTimePanel` 控制.
|
||||||
|
|
||||||
默认情况下选择一个日期后时间面板就自动显示.
|
默认情况下选择一个日期后时间面板就自动显示.
|
||||||
|
|
||||||
<!-- ControlOpen -->
|
<!-- ControlOpen -->
|
||||||
@@ -53,6 +59,7 @@
|
|||||||
### 控制弹窗打开
|
### 控制弹窗打开
|
||||||
|
|
||||||
可以通过 `open` 去控制弹窗的显示
|
可以通过 `open` 去控制弹窗的显示
|
||||||
|
|
||||||
下面的例子说明怎么关闭弹窗当选择秒的时候
|
下面的例子说明怎么关闭弹窗当选择秒的时候
|
||||||
|
|
||||||
<!-- HideSeconds -->
|
<!-- HideSeconds -->
|
||||||
@@ -60,6 +67,7 @@
|
|||||||
### 隐藏秒和显示 am/pm
|
### 隐藏秒和显示 am/pm
|
||||||
|
|
||||||
时间选择的列是自动显示通过 `format`的设置.
|
时间选择的列是自动显示通过 `format`的设置.
|
||||||
|
|
||||||
你可以通过 `showHour` `showMinute` `showSecond` 覆盖默认值
|
你可以通过 `showHour` `showMinute` `showSecond` 覆盖默认值
|
||||||
|
|
||||||
<!-- MinuteStep -->
|
<!-- MinuteStep -->
|
||||||
@@ -67,6 +75,7 @@
|
|||||||
### 间隔的时间和自定义时间选择
|
### 间隔的时间和自定义时间选择
|
||||||
|
|
||||||
设置间隔的时间通过`hourStep` `minuteStep` `secondStep`.
|
设置间隔的时间通过`hourStep` `minuteStep` `secondStep`.
|
||||||
|
|
||||||
设置自定义的选择通过`hourOptions` `minuteOptions` `secondOptions`.
|
设置自定义的选择通过`hourOptions` `minuteOptions` `secondOptions`.
|
||||||
|
|
||||||
<!-- FixedTimeList -->
|
<!-- FixedTimeList -->
|
||||||
|
|||||||
Reference in New Issue
Block a user