简体   繁体   English

SAPUI5:如何重置/清除TextArea oder日期字段

[英]SAPUI5: How can I reset/clear a TextArea oder Date-Field

i need help with the above question. 我需要上述问题的帮助。

To clear a normal Textfield works very well. 清除正常的Textfield效果很好。 example code: 示例代码:

_resetButton: function () {
    var InputField = this.byId("idInputField");
    InputField.setValueState("None");
    InputField.setValueStateText(null);
}

but for TextArea or DatePicker field it doesn't work. 但对于TextAreaDatePicker字段则无效。

Have anybody an idea how i can set Value null 有谁知道我如何设置值null

i have tried it with setValue() or setText() but without success. 我已经尝试过使用setValue()setText()但是没有成功。

Best regard 最良好的问候

Here is an JSBIN example 这是一个JSBIN示例

setValue("")

They all inherit from sap.m.InputBase and there is a setValue() 它们都从sap.m.InputBase继承,并且有一个setValue()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM