friendica / red

The Red Matrix
MIT License
214 stars 50 forks source link

profile birthday: lost ability to provide an empty or blank year #687

Closed friendica closed 9 years ago

friendica commented 9 years ago

When the datetime picker was added to the profile edit form, we lost the ability to not provide a birth year and only include month and day so that birthday events would be generated. This is critical functionality.

friendica commented 9 years ago

additionally it currently does not seem possible to select a year earlier than 1999, and if you're over say age 2, clicking the back button on the calendar to get to your birthyear is a bit daunting.

pafcu commented 9 years ago

I can't reproduce not being able to use a year earlier than 1999. Seems to work fine for me.

pafcu commented 9 years ago

Not being able to leave out the birthyear can be fixed in two ways: provide a checkbox for ignoring year, or instructing user to type in 0000 for the year. Both of these are suboptimal IMHO. Maybe it would be better to revert to the old behaviour, or perhaps there is a better date picker for birthdays that supports leaving out the year. I do however like being able to type in the birthdate which was previously not possible.

ghost commented 9 years ago

Isn't this related or fixed with issue #670 ?

friendica commented 9 years ago

Hmmm. I can't reproduce the 1999 limit now but earlier when I clicked the "back one month" button it stopped at november 1999 and was disabled at that point.

If I enter manually a year of 0000 it is converted to 2000.

Anyway, a possible workaround might be to suggest either "YYYY-MM-DD or MM-DD" but run the result through strtotime for validation. That would give type-in input. strtotime will put the current year on it, but we could could check for lack of a year before passing it through strtotime and flag that the year should be discarded. It's a bit convoluted, but would work. I don't care for the old selectors either, but the bootstrap picker isn't optimal for this purpose.

pafcu commented 9 years ago

I think that the 0000 trick does work (note that it doesn't show your age if you do it). The problem seems to be displaying it incorrectly when editing the profile.

friendica commented 9 years ago

Yes, you're right. Though if you don't know this has happened any other profile change will then save the 2000 date. That's how I discovered this issue - my profile reported I was 14.

pafcu commented 9 years ago

I've found a better replacement for the current widget with a much better interface, and will probably try to make a "proper" fix once I get that working.

ghost commented 9 years ago

This issue was moved to redmatrix/redmatrix#148