Hi all,
how can I use datepicker in a Date field?
I try to disable past dates like that:
<field class="delivery_date" name="delivery_date" options="{'datepicker':{'minDate': 0}}"/>
But past dates are shown nevertheless.
Thanks in advance!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Yes, you can disable the paste dates but it cannot be done with any widget or options.
You will have to override the date picker library in JS and disable the paste dates. You will have to make the following change here:
minDate: new Date();
Either you can override the JS and make the change or you can directly change in the JS code in the base module.
Hello, you can use:
<field name="date_invoice" options="{'datepicker': {'warn_future': true}}"/>
show only future dates.
Hi GiusyG,
thanks for your help. Unfortunately this is not working as well. It seems to me that the "options" part is not parsed in a way. So whatever options I use, it has no effect.
Do you or does anyone know what's wrong there?
This doesn't work sir.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 12 19
|
9711 | ||
|
1
thg 5 16
|
4568 | ||
|
3
thg 3 25
|
3617 | ||
|
0
thg 11 22
|
2343 | ||
|
1
thg 7 24
|
36 |
I know it's been a year but have you found a solution?
Hi Yannick. No unfortunately not..