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
When i pass a date object as an input for the defaultViewDate, this variable should not be modified when i'm changing the viewDate by switching my view manually
Actual behaviour
My input variable is changed when i'm switching the view mode manually
Step to reproduce
Given I have a datepicker
And I pass a Date variable as defaultViewDate option,
When I open the datepicker
And I click on the month view
And I click on another month than my defaultViewDate
Then my date variable has been changed
Expected behaviour
When i pass a date object as an input for the defaultViewDate, this variable should not be modified when i'm changing the viewDate by switching my view manually
Actual behaviour
My input variable is changed when i'm switching the view mode manually
Step to reproduce
Given I have a datepicker
And I pass a Date variable as defaultViewDate option,
When I open the datepicker
And I click on the month view
And I click on another month than my defaultViewDate
Then my date variable has been changed
Datepicker version used
1.9.0
Example code
https://jsfiddle.net/g7r0ow4y/
I think its maybe related to this commit 8c99457 , because other case use a copy of the startDate (by doing a
new Date
), but not on this else.(Maybe i'm wrong, i didn't investigate so much and i'm not used to js)
The text was updated successfully, but these errors were encountered: