Skip to Content
Menu
This question has been flagged
2 Replies
11649 Views

*.py

test_date1 = fields.Date('Test Date1')
test_date2 = fields.Datetime('Test Date2')

*.xml

<field name="test_date1" widget="daterange"/>
<field name="test_date2" widget="daterange"/>

The date range picker can show in the website,but after click the "Apply",the date range didn't show in field,just blank

Avatar
Discard

Really appreciate that!Thank you!

Best Answer

add options related_end_date and related_start_date like

<field name="test_date1" widget="daterange" options="{'related_end_date': 'test_date2'}"/>
<field name="test_date2" widget="daterange" options="{'related_start_date': 'test_date1'}"/>

Avatar
Discard