parodoo / parOdoo

Extensions and addons for Persian language support in Odoo ERP.
Apache License 2.0
13 stars 16 forks source link

fix date parse for 1399/11/1. #11

Closed BabakMahmoudi closed 3 years ago

BabakMahmoudi commented 3 years ago

Datepicker failed for some specific dates such as (1399/11/1, 1400/1/22,...). It turns out that is again due to 'jalali-moment', it fails to make moment objects from moment objects!. In fact 'makeMoment' function should recognize its input so that when input is already a moment object it should not be re-parsed: function makeMoment(input, format, lang, strict, utc) { if (moment.isMoment(input)){ if (utc){ return moment.utc(input); } return input; }