Metaculus / metaculus

https://www.metaculus.com
BSD 2-Clause "Simplified" License
54 stars 12 forks source link

Min/max date inputs error badly if you input an invalid date #1448

Open hickman-santini opened 2 days ago

hickman-santini commented 2 days ago

Current behavior

Following up on https://github.com/Metaculus/metaculus/issues/742#issuecomment-2483516922

If both min/max datetimes are touched, and one's briefly invalid, it crashes: (Reproduction: flip AM/PM on min or max, then change the other month to 11)

(You get an "Error: Try again" page and lose your work)

Unintuitive to remember to not input leading zeroes and edit days before months because ~half the months don't have the default (31st)

Happens consistently on Chrome on Mac. Better luck with how <input type="datetime-local"> works on mobile

While we're at it:

https://www.metaculus.com/questions/create/question/?type=date defaults seem better than https://www.metaculus.com/questions/create/group/?subtype=date defaulting min and max to the epoch

@ncarazon can you just remove the epoch defaults from group date question creation? image

SylvainChevalier commented 2 days ago

Duplicate of #1371, copying here for consolidation:

If I press 0 here image I get this image

I assume because the creator is trying to make a graph with an invalid date. I know I don't need to press 0 for anything (I can just do 1 for 01), but if I forget and press it I lose all of my progress on the question.

tbc, to reproduce: