-
- Downloads
[FIX] spreadsheet,web: use dot or comma in date format
Date fields are changing format if you type it in instead of using the
date selector calendar popup
Steps to reproduce:
1. Install Time Off
2. Open the current language and change the date format to `%d.%m.%Y`
3. Go to Time Off > Approvals > Allocations
4. Create a new allocation
5. Change the validity period to 10.03.2023 (by typing it in, not using
the datepicker) and click out of the field
6. The date displayed is changed to 2010/03/20 or 20.03.2010 (if the
datepicker was opened)
Solution:
Add dot and comma as a possible character for static format
Also deduplicated function isValidStaticFormat so we have a single
definition
Problem:
Formats using dots were not considered as valid static format so the
value entered was parsed with the format `yyyy/MM/dd` instead
opw-3081268
closes odoo/odoo#111862
Signed-off-by:
Rémi Rahir (rar) <rar@odoo.com>
Showing
- addons/spreadsheet/static/src/global_filters/components/year_picker.js 1 addition, 13 deletions...sheet/static/src/global_filters/components/year_picker.js
- addons/web/static/src/core/datepicker/datepicker.js 10 additions, 10 deletionsaddons/web/static/src/core/datepicker/datepicker.js
- addons/web/static/tests/core/datepicker_tests.js 16 additions, 0 deletionsaddons/web/static/tests/core/datepicker_tests.js
Loading
Please register or sign in to comment