nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.19k stars 273 forks source link

Entering a due date manually interprets it independantly from the user's locale #5075

Open provelo-ict opened 1 year ago

provelo-ict commented 1 year ago

Describe the bug When one enters a due date manually, the date gets interpreted as an American date (mm/dd/yyyy) instead of the format from the locale (e.g. dd/mm/yyyy).

To Reproduce Steps to reproduce the behavior:

  1. Open a card
  2. In the date field, instead of selecting the date with mouse clicks, enter the date by keyboard (e.g. 01/09/2023)
  3. Press Enter
  4. The date is now 09 january 2023

Expected behavior

The date should be interpreted in accordance with the user's locale. In our exemple, it should be 1st septembre 2023

Client details:

Server details **Operating system**: Ubuntu 22.04 **Web server:** Apache2 **Database:** Mysql **PHP version:** 8.1.2 **Nextcloud version:** 26.0.5
provelo-ict commented 1 year ago

The javascript console gives more information about this:

Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info. Arguments: [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 01/09/2023, _f: undefined, _strict: undefined, _locale: [object Object] 30381/E/e.exports<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:2515570 In@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:2539884 Vn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:2543216 Wn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:2543083 qn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:2542802 Qn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:2543574 Kn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:2543608 i@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:2512475 parse@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4817472 parseDate@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3156291 handleInputChange@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3159376 handleInputKeydown@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3159669 Rt@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3045518 n@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3038355 20144/na/i._wrapper@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3077470 EventListener.handleEvent*na@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3077496 Ve@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3038642 aa@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3077877 _@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086760 f@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086066 m@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086517 f@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086051 m@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086517 f@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086051 20144/qa@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3090060 20144/e.prototype._update@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3066589 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3097559 20144/e.prototype.get@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3048200 e@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3048113 20144/nr.prototype.$mount/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3097583 20144/nr.prototype.$mount@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3097801 init@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3052972 20144/f/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3085660 f@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3085937 20144/qa@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3090060 20144/e.prototype._update@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3066589 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3097559 20144/e.prototype.get@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3048200 e@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3048113 20144/nr.prototype.$mount/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3097583 20144/nr.prototype.$mount@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3097801 init@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3052972 20144/f/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3085660 f@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3085937 m@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086517 f@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086051 m@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086517 f@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086051 m@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086517 f@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3086051 20144/qa@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3090329 20144/e.prototype._update@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3066572 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3097559 20144/e.prototype.get@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3048200 20144/e.prototype.run@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3048933 yn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3050891 20144/$t/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3046577 Zt@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3045976 promise callback*jt@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3046066 $t@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3046640 Fn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3051387 20144/e.prototype.update@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3048869 20144/e.prototype.notify@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3034312 set@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:3036115 mr.prototype.init/</<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4376131 mr.prototype.init/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4376110 rr.prototype.updateRoute@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4371028 rr.prototype.transitionTo/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4368888 rr.prototype.confirmTransition/</<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4370892 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366756 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366794 Kn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366803 rr.prototype.confirmTransition/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4370795 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366756 Kn/r/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366785 rr.prototype.confirmTransition/m/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4370500 Jn/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4367373 m@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4370135 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366765 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366794 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366794 r@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366794 Kn@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4366803 rr.prototype.confirmTransition@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4370526 rr.prototype.transitionTo@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4368854 t.prototype.push@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4373285 mr.prototype.push/<@https://cloud.ourdomain.example/apps/deck/js/deck-main.js?v=d2080784-18:2:4376601