pywb
pywb copied to clipboard
Advanced search requires prior knowledge of CDX datetime format
Describe the bug
Using the date/time filter on the Advanced Search page requires the user to know that they should enter these values using the date/time format that the CDX API expects. This isn't intuitive and can lead to mistakes being made.
Steps to reproduce the bug
Using the supplied config.yaml you can start up wayback and point your browser at the search page for the pywb collection, click Advanced Search Options and enter a From of 2014-01-26 and a To of 2014-01-27. After you click the Search button you can see the query string in the URL lacks the from and to parameters, and the filter was not applied to the results.
If you enter From of 20140126 and To of 20140127 the respective query parameters show up, and the filter is applied.
Expected behavior
Ideally there should be some help text in the form to indicate what format the date/time should be in. There is some text that displays when hovering over the form element, but it doesn't actually help users determine what format the supplied value should be in. If the format that is supplied is incorrect an error message should appear.
Alternatively there could be a date picker for both?
There is actually an error message but it is only activated if you first click Search without supplying a URL and then fill in a faulty date. The https://github.com/webrecorder/pywb/pull/722 pull request would activate the feedback directly upon selecting Advanced Search Options.
Yes, ideally this should just automatically convert to the correct format. Will take a look at the PR, thank you!
This was fixed by https://github.com/webrecorder/pywb/pull/794