تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
7133 أدوات العرض

Hi, 

Do you know if it's possible to have this beavior in odoo :

<input class="oe_datepicker_master" type="text" name="date_start" readonly="">

This html forces the user to use date picker and the user can't insert text. 

If I do readonly=True in odoo the user can't write the date or even choose the date from the date picker.

Do you know how to do this in odoo?

Thanks


الصورة الرمزية
إهمال
أفضل إجابة

You will always have a extreme case where the user's browser doesn't load the javascripts.

If you want constraints on what can be encoded in that field, you should check the submitted form with the same rules used by the date picker.

Maybe you can define a javascript that will remove the readonly property of the field only when date picker have the focus.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
يناير 19
8302
2
يناير 24
2599
2
يونيو 22
4533
2
يونيو 18
6085
2
نوفمبر 16
13704