目前,我正在尝试向添加
添加一些日期参数从我的后端我得到了
/日期(1525521600000 + 0000)/
我尝试了一些像
这样的方法 <Text text="{path: 'ValueDate',
type: 'sap.ui.model.odata.type.DateTime',
formatOptions: {
style: 'medium'
}
}"/>
但这没有给我输出
如果我尝试
<Text text="{path: 'ValueDate',
type: 'sap.ui.model.odata.type.Date',
formatOptions: {
style: 'medium'
}
}"/>
我出去了
但我想要像dd / MM / yyyy
这样的输出答案 0 :(得分:1)
如果您没有获得标准的OData日期对象,则必须通过SAPUI5的格式化程序功能执行此操作:
text="{
path: 'ValueDate',
formatter: '.formatter.date'
}"
在formatter.js文件中,您必须实现“日期”功能并将其转换为所需的值。 有关格式化程序的更多信息: https://openui5.hana.ondemand.com/1.38.5/#docs/guide/0f8626ed7b7542ffaa44601828db20de.html
答案 1 :(得分:0)
绑定:
<img class="aligncenter" src="https://rianco.ro/wp-content/uploads/2018/05/harta_mare-1.jpg" alt="">
<div id="link-1" class="harta-links multilinks" style="top: 210px; left: 338px;"><img src="https://rianco.ro/wp-content/uploads/2018/05/thumb_barza-alba.png"> <a class="harta-links suplimentar" style="top: 0px; left: 0px;" href="/atlas/barza-alba">
<img src="upload/caroline.png"></a> <a class="harta-links suplimentar" style="top: 0px; left: 0px;" href="/atlas/gasca-canadiana"><img src="upload/gasca-canadiana.png"></a></div>
<a id="link-2" class="harta-links" style="top: 262px; left: 154px;" href="/atlas/cangur-dama"><img src="upload/thumb/thumb_cangur-dama.png"></a> <a id="link-31" class="harta-links" style="top: 332px; left: 958px;" href="https://rianco.ro/python/"><img src="https://rianco.ro/wp-content/uploads/2018/05/thumb_antilopa-eland.png"></a> <a id="link-32" class="harta-links" style="top: 312px; left: 916px;" href="https://rianco.ro/python/"><img src="https://rianco.ro/wp-content/uploads/2018/05/thumb_calul.png"></a> <a id="link-33" class="harta-links" style="top: 287px; left: 874px;" href="https://rianco.ro/python/"><img src="https://rianco.ro/wp-content/uploads/2018/05/thumb_cerb-lopatar.png"></a> <a id="link-34" class="harta-links" style="top: 268px; left: 831px;" href="https://rianco.ro/python/"><img src="https://rianco.ro/wp-content/uploads/2018/05/thumb_zebra.png"></a> <a id="link-35" class="harta-links" style="top: 243px; left: 777px;" href="https://rianco.ro/python/"><img src="https://rianco.ro/wp-content/uploads/2018/05/thumb_strut-emu.png"></a>
<a id="link-35" class="harta-links" style="top: 213px; left: 807px;" href="https://rianco.ro/python/"><img src="https://rianco.ro/wp-content/uploads/2018/05/thumb_zebu.png"></a>
格式化程序功能
text="{
path: 'ValueDate',
formatter: '.formatter.dateFormatter'
}"