您好,我正在使用ODOO V11,并且日期选择器中需要一个规则,不允许选择过去的日期。 为此,我正在使用社区中的模块 https://apps.odoo.com/apps/modules/11.0/web_widget_datepicker_options/
当我在最小日期中将参数0设置为仅允许从当前日期开始的日期时,出现了一些错误:
# Step 1
git checkout -b alex # 'alex' or whatever branch name you prefer
# Step 2
# now you can edit your .gitignore to include your 'alex.todo' file
# Step 3
git add . && git commit -m 'commit some ignore files'
git push alex alex:master # git push <remote> <local branch name>:<remote branch to push into>
# Step 4
git checkout master # return to branch master and do any editings(commits)
# Step 5
# make sure branch alex is in sync with master whenever you want to push the project to the backup repo
git checkout alex
git merge master # .gitignore will not automatically be included for commit unless specifically added
# now you can repeat step 3 to push the project to the backup repo
eError:maxDate()无法解析日期参数:0。
当我尝试传递特定日期时,它会成功运行
<field name="active_date" options="{'datepicker':{'minDate': '0'}}"/>
您能否看一下并告诉我正确的参数,以便将其添加到datepicker选项中?
答案 0 :(得分:0)
为使日期选择器仅接受将来的日期,您需要将代码更改为
<field name="active_date" options="{'datepicker':{'minDate': 'now'}}"/>