Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
5377 Prikazi

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?

Avatar
Opusti
Best Answer

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!

\

Avatar
Opusti
Avtor

Thanks for the help.

But I want for odoo v12 .

You can migrate to desired version !

Avtor

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 !

Avtor

Yes I have checked.

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

This option is also not worked.

Avtor

Ok sure, will post issue.Thanks