cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to bind dates in DateNavigator

Former Member
0 Kudos

Trying to pick a variable from the context to bind startsWith or firstSelectedDate for the DateNavigator control - but the property gets masked as MM/DD/YYY.

For example, in view MAIN I created a context root attribute caklled 'START_DATE" but instead of setting the property as "MAIN.START_DATE" as expected it sets it as "S/TA/MAIN".

Is there something else needed to set the property as a context variable and not an actual date? Has anyone else seen this problem?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Unfortunately I am getting an invaid date at runtime too. Oh well, at least I know that I'm using the control correctly, will figure out a workaround.

Thx for the input ... !

Former Member
0 Kudos

Hi Mike,

i do not know what runtime error you have.

I had it too , i have solved it by supplying a date to the property ''Start_date".

Answers (4)

Answers (4)

Former Member
0 Kudos

OK, I see now. You are correct need a default date - I forgot to default one of them.. Points have been awarded accordingly - thanks!

Former Member
0 Kudos

Hey Baskaran,

There is something else wrong. I have created the 2 attributes correctly and given them default values. It's when I try to bind the attribute to the property is the strangeness.

When I ckick the bind button on the startWth property a "Choose Context Element" pops up and highlights only the attributes that I created - which means they are the correct type - but after I choose the attribute it populates the property binding wth the garbled date format for the attribute.

After you bound your attribute to the property does it display the property value as "<view>.<atribute>" or the defaulted date?

Former Member
0 Kudos

>

> Hey Baskaran,

>

> There is something else wrong. I have created the 2 attributes correctly and given them default values. It's when I try to bind the attribute to the property is the strangeness.

>

> When I ckick the bind button on the startWth property a "Choose Context Element" pops up and highlights only the attributes that I created - which means they are the correct type - but after I choose the attribute it populates the property binding wth the garbled date format for the attribute.

>

> After you bound your attribute to the property does it display the property value as "<view>.<atribute>" or the defaulted date?

Hi Mike,

the property value is just as you said "NA.T_.V_DA" strange.. that is what i meant harmless bug.

My view name is V_DAT_NAV, attribute name is start_date, after binding the name appears as above.

Now i understand what the documents described about "no binding needed" something like that. You can very well enter a actual date over there like 01012010.

Anyway.. i guess you understand now what is going on !!

Actually i misunderstood your first post, i thought that you have problem at runtime. That is why i posted that it is working fine.

Now I do understand that posted regarding the design time appearance of the binding value.

Edited by: Baskaran Senthivel on Jan 25, 2011 9:26 PM

Former Member
0 Kudos

Hi Baskaran,

Yes, tried type D and sydatum, still populating as a hardcoded date.

SAP says this property does not have to be bound? Not sure what it means by 'can be changed by the client', wonder if there is an API call directly to the navigator object ... ?

Former Member
0 Kudos

Hallo ,

i have done a small test. It is working fine for me. I have 2 attribute (start_date, end_date of type D, with default values 01012010,01012012 respectively )

You also need to supply a value for start_date . i supplied 20012010.

It is working perfectly selecting 20012010 as start date.

with respect to the rare appearance of the binding ''NA.T_.V_DA''. I think it is to enter date there, i think it is harmless bug .

Former Member
0 Kudos

Hi,

It seems to me that the value you binded are going through the conversion. Strange.

I see in date navigator property : "This property, which does not have to be bound, can be changed by the client"

What type is it your start_date, i assume it is type D ?.

You can remove the context binding and once again bind to a attribute of type D.