Skip to content
Snippets Groups Projects
Commit 5f17d897 authored by MerlinGuillaume's avatar MerlinGuillaume
Browse files

[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: default avatarRémi Rahir (rar) <rar@odoo.com>
parent 45ebcbf3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment