콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
10976 화면

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!

아바타
취소

I know it's been a year but have you found a solution? 

작성자

Hi Yannick. No unfortunately not..

베스트 답변

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.

관련 게시물 답글 화면 활동
1
12월 19
9910
1
5월 16
4720
3
3월 25
3928
0
11월 22
2516
1
7월 24
36