openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.DateTimeField.js BUG for V4

Open zhusky2017 opened this issue 7 years ago • 16 comments

OpenUI5 version: 1.68

Browser/version (+device/version): OData V4 Model

Steps to reproduce the problem: image image image

zhusky2017 avatar Jul 19 '19 11:07 zhusky2017

please quick fix,thanks

zhusky2017 avatar Jul 19 '19 11:07 zhusky2017

Dear @zhusky2017 we need some more information to process your incident: How have you bind your data to the control? Are you using the "dateValue" property? And which odata type are you using?

Best regards Alex

alexanderriess avatar Jul 22 '19 08:07 alexanderriess

Here is a JSBin to reproduce the error: https://jsbin.com/fudizuq/edit?js,output

boghyon avatar Jul 22 '19 11:07 boghyon

Dear @zhusky2017 we need some more information to process your incident: How have you bind your data to the control? Are you using the "dateValue" property? And which odata type are you using?

Best regards Alex

Dear @alexanderriess

  1. bind data to the control
    bindElement({ path: "/Facilities('10000')", }) 2.new sap.m.DateTimePicker({value: "{openedDate}",width:"auto"}) 3.sap.ui.model.odata.type.DateTimeOffset

Thank you for your reply

zhusky2017 avatar Jul 22 '19 12:07 zhusky2017

Dear @zhusky2017,

Is the value for openedDate already there? I mean have you debugged how oDate looks like in line 123? Is it perhaps a string? What is the value for sValue?

Regards Silke

Silkinator avatar Jul 22 '19 12:07 Silkinator

Here is a JSBin to reproduce the error: https://jsbin.com/fudizuq/edit?js,output

Very true,That's the case

zhusky2017 avatar Jul 22 '19 12:07 zhusky2017

Dear @alexanderriess Look at this: https://jsbin.com/fezeluhecu/1/edit?js,console,output OpenedDate exist, openedDate:"2019-07-26T13:57:39Z"

zhusky2017 avatar Jul 22 '19 12:07 zhusky2017

Okay I do not see how this helps. I opened the link there is an input field visible not a Datimepicker... also no Facilities are here. Do you mean to bin on the control? Facilities is from the TripPinRESTierService?

Regards Silke

Silkinator avatar Jul 22 '19 12:07 Silkinator

https://jsbin.com/fudizuq/edit?js,output is sap.m.Input https://jsbin.com/fezeluhecu/1/edit?js,console,output is sap/m/DateTimePicker image image

zhusky2017 avatar Jul 22 '19 12:07 zhusky2017

@Silkinator About the samples; currently there is an issue with earlyRequests: true --> https://github.com/SAP/openui5/issues/2288#issuecomment-514189383. If the demo breaks too many times, please disable that setting in order to run the demo reliably.

boghyon avatar Jul 23 '19 15:07 boghyon

Hi @zhusky2017 we are working on a fix for this issue. We will tell you if it is merged.

Best regards Alex

alexanderriess avatar Jul 24 '19 08:07 alexanderriess

ok thanks

zhusky2017 avatar Jul 26 '19 07:07 zhusky2017

Hi @zhusky2017 we have done a fix and it is merged: https://github.com/SAP/openui5/commit/732a4a66affd49f0a72d90cc61dbb18213d3a861

We hope this helps you to solve your problem, sry for the ininconvenience we caused. Best Regards Alex

alexanderriess avatar Jul 31 '19 08:07 alexanderriess

Hi @alexanderriess Thank you for the fix. I see that it works now if the value is bound to the dateValue property. Is there a plan to also enable binding it to the value property?

That would align with the guidelines such as:

Use the dateValue property if (...). Although possible to bind it, the recommendation is not to do it. When binding is needed, use value property instead.

Here we can see that binding to value is still having the issue: https://openui5nightly.hana.ondemand.com/test-resources/sap/ui/core/demokit/sample/common/index.html?component=ViewTemplate.types

boghyon avatar Aug 01 '19 16:08 boghyon

Hi @boghyon , we are discussing your issue with our Colleagues, we will inform you if we have news for you!

Best regards Alex

alexanderriess avatar Aug 02 '19 14:08 alexanderriess

Hi,

This commit fixes the issue: https://github.com/SAP/openui5/commit/dc2fa245722c1d793857cd8c8d2cfc343128c0c7

Regards, Alex

a-z-ivanov avatar Aug 05 '19 11:08 a-z-ivanov