Hello.
If I call setValue on already existing datetimepicker,
then it set it properly in frontend views, but getValue return non correct value
in terms of month, e.g. if I set 06 January 2025, the getValue return 10 February 2025
I find it changed after calling _loadDateData function at line 990 - https://github.com/jiandaoyun/Perfect-DateTimePicker/blob/f5d274b173d316576fc915bb02b20a05546f682c/src/jquery.datetimepicker.js#L990C17-L990C30
Probably inside a loop of _loadDateData near the line -
I fixed it, replaced currentDate = value; at line https://github.com/jiandaoyun/Perfect-DateTimePicker/blob/f5d274b173d316576fc915bb02b20a05546f682c/src/jquery.datetimepicker.js#L989C16-L989C37 with currentDate = structuredClone(value); i.e. creating a copy of Date object.
Hello.
If I call setValue on already existing datetimepicker,
then it set it properly in frontend views, but getValue return non correct value
in terms of month, e.g. if I set 06 January 2025, the getValue return 10 February 2025
I find it changed after calling _loadDateData function at line 990 - https://github.com/jiandaoyun/Perfect-DateTimePicker/blob/f5d274b173d316576fc915bb02b20a05546f682c/src/jquery.datetimepicker.js#L990C17-L990C30
Probably inside a loop of _loadDateData near the line -
Perfect-DateTimePicker/src/jquery.datetimepicker.js
Line 476 in f5d274b
I fixed it, replaced currentDate = value; at line https://github.com/jiandaoyun/Perfect-DateTimePicker/blob/f5d274b173d316576fc915bb02b20a05546f682c/src/jquery.datetimepicker.js#L989C16-L989C37 with currentDate = structuredClone(value); i.e. creating a copy of Date object.