致命错误: Call to undefined function %y-%M-%d()

在TP5.0中套模板时出现的问题:

致命错误: Call to undefined function %y-%M-%d()_第1张图片

 

 原有html模板代码:

1 <input type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;">
2 -
3 <input type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })" id="datemax" class="input-text Wdate" style="width:120px;">

解决办法:

将$符号进行转义"\$",如下:

1 <input type="text" onfocus="WdatePicker({ maxDate:'#F{\$dp.\$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;">
2 -
3 <input type="text" onfocus="WdatePicker({ minDate:'#F{\$dp.\$D(\'datemin\')}',maxDate:'%y-%M-%d' })" id="datemax" class="input-text Wdate" style="width:120px;">

 

你可能感兴趣的:(致命错误: Call to undefined function %y-%M-%d())