|
|
@@ -77,7 +77,7 @@ class App extends React.Component {
|
|
|
### Date and Time Selection
|
|
|
|
|
|
Set `type` to `dateTime`, can choose date and time.
|
|
|
-If you want to remove the infinite loop scrolling interaction of TimePicker, you can pass timePickerOpts into a specific configuration to close it.
|
|
|
+Starting from version V2.22.0, we changed the default mode of ScrollItem in TimePicker from wheel to normal. If you want to apply the infinite scrolling effect again, you can enable it by passing in a specific configuration through timePickerOpts.
|
|
|
|
|
|
```jsx live=true
|
|
|
import React from 'react';
|
|
|
@@ -91,8 +91,8 @@ class App extends React.Component {
|
|
|
<DatePicker type="dateTime" />
|
|
|
<br />
|
|
|
<br />
|
|
|
- <h4>Turn off cycled mode</h4>
|
|
|
- <DatePicker type="dateTime" timePickerOpts={{ scrollItemProps: { cycled: false } }} />
|
|
|
+ <h4>Turn on cycled mode</h4>
|
|
|
+ <DatePicker type="dateTime" timePickerOpts={{ scrollItemProps: { mode: "wheel", cycled: true } }} />
|
|
|
</>
|
|
|
);
|
|
|
}
|
|
|
@@ -1057,7 +1057,7 @@ Multiple dates or times are used by default `","` (English comma) separated.
|
|
|
## FAQ
|
|
|
|
|
|
- **Date time picker, when you choose time, minute and second, you don't want to scroll infinitely. How to achieve the effect?**
|
|
|
- This behavior can be controlled by a specific switch in timePickerOpts, timePickerOpts={{scrollItemProps: {cycled: false}}}, and cycled is set to false
|
|
|
+ Starting from version V2.22.0, we changed the default mode of ScrollItem in TimePicker from wheel to normal. If you want to apply the infinite scrolling effect again, you can control this behavior through a specific switch in timePickerOpts, that is, timePickerOpts={{ scrollItemProps: { mode: "wheel", cycled: true } }}.
|
|
|
|
|
|
- **How to set the default display time when the panel is opened?**
|
|
|
You can use the defaultPickerValue property.
|