Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After clearing a date, calendar goes back to current month instead of startdate #2652

Open
Abd-el-hamid opened this issue Mar 14, 2022 · 1 comment

Comments

@Abd-el-hamid
Copy link

Expected behaviour

After clearing a date, calendar must go to the month of configured start date

Actual behaviour

After clearing a date, calendar goes back to current month instead of startdate

Datepicker version used

1.9.0

Example code

$('#sandbox-container input').datepicker({
format: "mm/dd/yyyy",
startDate: "05/13/2022"
});

@adiprsa
Copy link

adiprsa commented Jun 2, 2022

$('#sandbox-container input').datepicker({
        format: "mm/dd/yyyy",
        startDate: "05/13/2022",
        clearBtn: true,
        defaultViewDate: {month: 4}
});

just add clearBtn for button clear date and defaultViewDate with object property month for opening datepicker default view in month 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants