mysociety/popit

PopIt interface prevents saving birthdates of the form YYYY or MM-YYYY

Opened this issue · 0 comments

If I attempt to save a person entry with just the year of their birthdate set (or the month and year) e.g.
screen shot 2015-03-12 at 10 39 15

…I’m not shown an error on save save, but the birth date doesn’t save. If I disable javascript, I do see an error:
screen shot 2015-03-12 at 10 44 09

A glance at the code suggests it was once possible to set just the year:
screen shot 2015-03-12 at 10 45 41

The docs also suggest this is possible. I believe it is possible via the API, though I haven’t tested that.