From bc4b7c503673db29b0ea0d4a2b780378173fe3eb Mon Sep 17 00:00:00 2001 From: fw-bot Date: Thu, 10 Oct 2019 15:03:27 +0000 Subject: [FIX] web: can't edit subscription with end date beyond 200 years in the future -Import a subscription with end date beyond 200 in the future (ex: 2500-01-01). -Open the subscription and click the Edit button. Before this commit: A stacktrace appears indicating that a date is not valid. It's not possible to edit the subscription. After this commit: The maxDate of the date picker has been increased to 31/12/9999, allowing the user to edit subscriptions whose end date is that far in the future. A test `toggle datepicker far in the future` for this case has been created. closes odoo/odoo#38527 Opw: 2079696 X-original-commit: 32b6131c04fef7a542a0ccbdb924d177627bfe38 Signed-off-by: Nicolas Martinelli (nim) --- addons/web/static/src/js/widgets/date_picker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/widgets') diff --git a/addons/web/static/src/js/widgets/date_picker.js b/addons/web/static/src/js/widgets/date_picker.js index 95908433fec..bbe40a825ef 100644 --- a/addons/web/static/src/js/widgets/date_picker.js +++ b/addons/web/static/src/js/widgets/date_picker.js @@ -31,7 +31,7 @@ var DateWidget = Widget.extend({ locale: moment.locale(), format : this.type_of_date === 'datetime' ? time.getLangDatetimeFormat() : time.getLangDateFormat(), minDate: moment({ y: 1900 }), - maxDate: moment().add(200, "y"), + maxDate: moment({ y: 9999, M: 11, d: 31 }), useCurrent: false, icons: { time: 'fa fa-clock-o', -- cgit v1.2.3