Using Calendar Widget

Using Calendar Widget

  
Hello,

I have a problem using the Year Calendar widget:

I have the calendar visible to the user and when the user click on a day the date is past to an input widget that exists on the screen, and associated to this input widget there's a link to a popup screen. When we click in a day on the calendar the date we clicked is shown very well on the input widget, but when we click on the link to go to the popup window the value of the date is not passed to the popup window. It seems the value is passed to the input widget but is not saved by the system, because when i run the debbuger the input widget have no value (appears the initial value 1900-01-01).

We just have tried set the "SingleClick" property of the Year Calendar Widget to "True" and the "UpdateOnCloseOnly" property to "False" but the result is the same: the value appears correct on the input widget but is not present when we click on the link to the popup window.

Can you help me, please.

Regards,

José Faria.
Hi José.

Do you have the application running on a public server, so that we can understand the behavior you're describing?

An alternative would be for you to attach your eSpace, and explicitly state in which screen and inputs is that happening on, so that someone can try to look into it!

Regards,

Paulo Tavares
Hi Paulo,

On attachment is the eSpace where i'm the problem.
The Calendar Widget is defined on the screen "Timesheet_List" and when I click on a day of the calendar the date appears on the input widget, and after this I press the link button "Edit" and it opens a popup screen called "Timesheet_Popupedit" where i set the values i want and when press "Save" button it saves the registry on the database table. The date doesn't appears on the popup screen but i'm giving it as an input parameter.

Summarizing,
the problem is on 2 screens: Screen "Timesheet_List" and screen "Timesheet_Popupedit".

Regards,

José Faria.
Hi José.

I'm no expert in using this widget, but I would try to:

1 - In the "Edit" link, use the method "Submit" instead of Navigate.

If that doesn't work,

2 - Instead of using the Date_sheet variable as the input parameter, use the Session.Date_sheet (see in the debugger if this is indeed updated, or if it is 1900-01-01 as well...)
3 - If this doesn't work, try using the CreationDateAfterInput.TypedValue for input parameter...

These two are more sketchy - I'd hope that with the first tip you'd be able to do what you need!

Regards,

Paulo Tavares
Hi Paulo,

I tryed all the possible solutions that you say and any of them gives the correct result, and the first solution is not possible because of the popup. If I use the method Submit or Ajax it opens a new window and not a popup. But I tryed this solution too and the date isn't updated, it appears 1900-01-01.
I used the debbuger too and the 2 variables (Data_sheet and Session.Datasheet) are with the same value (1900-01-01).
The solution 3 isn't possible because the variable CreationDateAfterInput.TypedValue is of TEXT type and i need to pass a DATE type.

Regards,

José Faria.
Hi José.

Indeed, it seems that the Calendar Widget, even though it is changing the input value, it may not be triggering the OnChange action, since it is mainly designed to be triggered when the user actually changes the input.

If that's the case, what I've heard being suggested would be something like having the link calling the SaveData action (with an Ajax Refresh for the link only), and somehow invoking a "click" event on a link for the popup... It sounds complicated, but it would be my best shot at making it work... Either that or figuring out a way to trigger the "OnChange" event after using the calendar and/or javascript...

Out of curiosity, even though the Submit method doesn't launch a popup, does it at least use the correct value?

Regards,

Paulo Tavares
Hi Paulo,

The Submit method don't use the correct value. It appears like others with 1900-01-01.

Regards,

José Faria.
Ok... so that confirms that indeed the calendar changes the input, but not the variable.

But if you submit, the typedValue of the widget, even though it is text, is the correct one, right? If that's the case, then I guess you could try to do a TextToDate to parse the value and use it as input - or store it in the session variable. Then, with the Ajax refresh on the link, after storing the value in the session variable, you could force the click on the popup link to show the popup - and have the popup read the value directly from the session variable.

...I know it's far from pretty, but I'd say it is manageable.

Regards, and sorry for not being able to help you better. Let me know if you're able to work around it.

Paulo Tavares


Hi Paulo,

After a lot of tries I solve the problem with the date but to solve it I have another problem.
You have reason, the problem is with the method, using the method "Navigate" it don't save the value of the date, but using method "Submit" it saves the value.
The other problem that it causes is that method "Submit" don't open a popup, it opens a new window. I don't know other way to open a popup window using the method "Submit" or "Ajax", but i think it can be possible to do.

Regards,

José Faria.