Wrong date-from and/or date-until (01.01.1970) when a sleeping hat is activate
Summary
In "profile / settings / sleeping hat (Schlafmütze)" there is a "dein aktueller status" dropdown. If you choose "Ich bin für eine Weile nicht verfügbar", you are supposed to set a starting and and an ending date for being away from foodsharing. However you can save with both dates empty, one date empty or both dates showing proper date values.
If I leave both dates empty, save and go to my profile, I see "Boji hat eine Schlafmütze auf vom 01.01.1970 bis 01.01.1970".
If I leave just the "until" date empty, I get "Boji hat eine Schlafmütze auf vom 15.08.2019 bis 01.01.1970"
So if any or both date fields are empty, they are filled with "01.01.1970".
Steps to reproduce
Go to your profile, then settings, then under options choose "sleeping hat (Schlafmütze)". In the "dein aktueller status" dropdown choose "Ich bin für eine Weile nicht verfügbar".
Save with one or both dates empty. Now go to your profile and look for the text "XXX hat eine Schlafmütze auf ..."
What is the current bug behavior?
For every field you left empty, you will see the date 01.01.1970.
What is the expected correct behavior?
Force the user to select a valid "from" and "until" dates and make sure that "from <= to" before saving.
Relevant error messages and/or screenshots
None, but there should be an error message if "from" or "until" date is empty, or if "from" > "until".
Possible fixes
Force the user to select a valid "from" and "until" dates and make sure that "from <= to" before saving.