You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The problem is happen when using focusSelectedMonth = {false} and showPreviousMonths = {false} and monthsShown={2}
the date picker show previous month after clear selected values.
for example: if now December it will be show December, January after clear values it show November, December.
The resolving for the problem I put bottom in section: "How to fix the issue".
Can you fix it and upload in next version ?
If you have another work around for the problem I will be glad if you send me it.
To Reproduce
Steps to reproduce the behavior:
code:
`
import React from "react";
import DatePicker from './DatePicker'
export default class App extends React.Component {
Expected behavior
show previous month, instead to show December, January show November, December
Screenshots
before:
after clean:
How to fix the issue
I find the problem in package.
Need to set default value to method:
src -> DatePicker.jsx -> DatePicker -> onClearClick
set default value for monthSelectedIn
method code:
Describe the bug
The problem is happen when using focusSelectedMonth = {false} and showPreviousMonths = {false} and monthsShown={2}
the date picker show previous month after clear selected values.
for example: if now December it will be show December, January after clear values it show November, December.
The resolving for the problem I put bottom in section: "How to fix the issue".
Can you fix it and upload in next version ?
If you have another work around for the problem I will be glad if you send me it.
To Reproduce
Steps to reproduce the behavior:
code:
`
import React from "react";
import DatePicker from './DatePicker'
export default class App extends React.Component {
}
`
Expected behavior
show previous month, instead to show December, January show November, December
Screenshots
before:
after clean:
How to fix the issue
I find the problem in package.
Need to set default value to method:
src -> DatePicker.jsx -> DatePicker -> onClearClick
set default value for monthSelectedIn
method code:
`
onClearClick = (event) => {
if (event) {
if (event.preventDefault) {
event.preventDefault();
}
}
if (this.props.selectsRange) {
this.props.onChange([null, null], event);
} else {
this.props.onChange(null, event);
}
this.setState({ monthSelectedIn: 0 });
this.setState({ inputValue: null });
};
`
Thanks Michael
The text was updated successfully, but these errors were encountered: