Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2731 มุมมอง

Hello
How can I color a date field in a form view depending on the current date?

for instance red if < today and black otherwise

Thanks in advance,


Bruno

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

I have found this solution which seems to work:

<field name="date_entry" attrs="{'invisible': [('parent_id', '=', False)]}" decoration-danger="date_entry &lt; current_date"/>

อวตาร
ละทิ้ง