Closed robinboening closed 2 years ago
Seems to be flatpickr. We set the value to be nil
if there is no date https://github.com/AlchemyCMS/alchemy_cms/blob/6f6f47720a34cf45d6b4030c53d63d6a4e2df537/app/helpers/alchemy/admin/base_helper.rb#L320-L328
Not sure how to resolve this. Maybe there is a newer version or a setting we can use?
I haven't confirmed, but I found this code where flatpickr gets initialised with a certain configuration:
Maybe (also unconfirmed) flatpickr sets the current date by default, but I found the configuration defaultDate : null
which can be added. I am not sure if this has unintended side effects though.
flatpickr already defaults to null
on the defaultDate
option. My assumption was wrong. Source: https://flatpickr.js.org/options/
Is this still an issue after we merged #2197
This issue has not seen any activity in a long time. Please create a pull request with a fix or ask someone of the community if they can help. This issue will be closed in 7 days if no further activity happens.
This issue has not seen any activity in a long time. If the issue described still exists in recent versions of Alchemy, please open a new issue with. Thanks for reporting.
Steps to reproduce
Prerequisite: A resource model with a date attribute
Expected behavior
The input field for the date attribute should be left empty (unless it had a value stored in the db).
Actual behavior
The input field for the date attribute is set to the current date.
I think flatpickr populates the input field.
System configuration
main
branch