Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5370 Lượt xem

I am using odoo v12. I have disabled past dates. The first time it will disable previous dates well, but after selection of any date from the picker, the previous day is selectable and when try to select that day it will show an error message like unknown cors error.


today's date is 19th. I have disabled past dates, but the previous day(18th) is selectable in datepicker, when select that day or if you enter any previous day in input box manually(ex. 04/17/2019) it will display error.


How to solve this issue?

Any help?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello @Maitree,

Hope this ref. will help you.

kindly refer this  :-


https://stackoverflow.com/questions/38581583/disable-previous-dates-in-odoo-datepicker

https://apps.openerp.com/apps/modules/11.0/web_widget_datepicker_options/

Thanks!

\

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks for the help.

But I want for odoo v12 .

You can migrate to desired version !

Tác giả

I have used it for v12 but this code is not worked for v12. Some how I manage to disable past date using some other code.But only one issue is when I select any past date it will give error as per I explained in my question. I want to fix that issue.

i also faced the same thing.you can post this as an issue to Odoo. (https://github.com/odoo/odoo/issues).

Thanks !

Tác giả

Yes I have checked.

'<field name="current_date" options="{'datepicker':{'minDate': 0}}"/>

This option is also not worked.

Tác giả

Ok sure, will post issue.Thanks