I have a responsive web app and I have a start and end date on my form.  They are both just alike, but for some reason, the Start date works fine and the selected date from the date picker is stored in the local variable, but the End date doesn't work and always has null date value even though the date picker shows the date selected by the user.

Details follow:

This is what my form looks like…  I have a start date and end date specified.  Both are setup the same way but only the Start Date works.

Each has an input widget and a Date picker widget:

The start Date works fine.  I select a date from the picker and the value is populated into the StartDate text value and the OnSelect handler converts it from text to DateTime and stores the final value in StartDateDate (which is a datetime type).  The end date doesn’t work and there’s never a value populated in EndDate nor in EndDateDate.

Here are the screenshots of what I have setup for the End Date…

This is the Input widget; EndDate is a local variable of type text:

This is the DatePicker widget; EndDate is a local variable of type text:

This is the Onselect event; EndDateDate is a local variable of type DateTime:

I know I must be overlooking something simple.  Appreciate any pointers!

Hi Sylvia,

To setup the datepicker you can follow this document.

It's possible send a example of your web page (OML)?

Cheers,

Nuno Verdasca


Nuno Miguel Verdasca wrote:

Hi Sylvia,

To setup the datepicker you can follow this document.

It's possible send a example of your web page (OML)?

Cheers,

Nuno Verdasca


Thanks, Nuno;  I have seen that documentation.  Like I said, the Start Date widget is working for me.  Then End Date widget is not even though they are the same.  Its odd behavior and I'm not seeing what I have missed...or perhaps there is a bug somewhere,


Maybe not, but still ask ... Can you send me an OML with the example of what you are doing, without exposing confidential information? It might be easier for me to be able to help you.

Nuno Miguel Verdasca wrote:

Maybe not, but still ask ... Can you send me an OML with the example of what you are doing, without exposing confidential information? It might be easier for me to be able to help you.

I've attached it.  Thanks.  Its on the SampleTubeList screen.


Hi Sylvia,

I couldn't help you. I tried everything and anything, read all the information I found. I asked a colleague for help ... And we couldn't find the problem. In the information of the component, it says that it needs OnSelect as well as OnClose, but it is not possible to add ... the question I raise is: Is it because we are in a Reactive application? So you can't have two DatePicker on the same page? I think you better ask the same thing in the support of the component.

Sorry, I was still an hour trying to analyze from end to end. I cleaned up your whole page with just the essentials, and didn't come to a conclusion.

Regards,
Nuno Verdasca

Nuno Miguel Verdasca wrote:

Hi Sylvia,

I couldn't help you. I tried everything and anything, read all the information I found. I asked a colleague for help ... And we couldn't find the problem. In the information of the component, it says that it needs OnSelect as well as OnClose, but it is not possible to add ... the question I raise is: Is it because we are in a Reactive application? So you can't have two DatePicker on the same page? I think you better ask the same thing in the support of the component.

Sorry, I was still an hour trying to analyze from end to end. I cleaned up your whole page with just the essentials, and didn't come to a conclusion.

Regards,
Nuno Verdasca

Thanks so much, Nuno.  I am sorry you burned so much time on this.  I was stumped as well and thought that maybe it was something silly that I overlooked.  I will ask for help elsewhere and if I find the answer, will post back here.  Appreciate your help!



You do not have to thank me, I was curious about this myself. And I would like to discover the mistake.

Cheers,
Nuno Verdasca

Solution

HI @sylvia Able


I went through your application , in End_date you made a mistake 

In the below screenshot i made a correction its works fine, previously you were passing End date in the event handler, insted of that you need to pass startDate, because date picker on select event can send  two out parameter as show in the below picture. So in End date picker your selecting just one date , so u need to pass StartDate insted of EndDate 


Here in the below screen shot you see that i am passing StartDate , So please change it into StartDate in your application then its works fine


I hope this helps you,


Thank you,


Regards,

Shree


Solution

Srinivas K Singadi wrote:

HI @sylvia Able


I went through your application , in End_date you made a mistake 

In the below screenshot i made a correction its works fine, previously you were passing End date in the event handler, insted of that you need to pass startDate, because date picker on select event can send  two out parameter as show in the below picture. So in End date picker your selecting just one date , so u need to pass StartDate insted of EndDate 


Here in the below screen shot you see that i am passing StartDate , So please change it into StartDate in your application then its works fine


I hope this helps you,


Thank you,


Regards,

Shree


You are correct, Shree!!!  Thanks so much!