-
- Downloads
[FIX] web: search input of date
When the user searches for date (or a datetime) in the search bar, the suggested date can become completely wrong. For example, in the French localization where the date format is DD/MM/YYYY, the system will search for the date MM/DD/YYYY. This is even worse when the date is not fully written: DD/MM could be converted to MM/DD/0000, which doesn't make any sense. This is related to the moment issue https://github.com/moment/moment/issues/1407. The fix is to make sure that the input date has a correct format thanks to `parse_value`. The latter converts the date into a fixed format. Fixes #11876 opw-676604
Showing
- addons/web/static/src/js/framework/formats.js 3 additions, 3 deletionsaddons/web/static/src/js/framework/formats.js
- addons/web/static/src/js/views/search_inputs.js 11 additions, 1 deletionaddons/web/static/src/js/views/search_inputs.js
- addons/web/static/test/search.js 1 addition, 3 deletionsaddons/web/static/test/search.js
Loading
Please register or sign in to comment