341
Views
5
Comments
Problem with Calendar Widget
I have an input field on an edit record and I am using the calendar widget from RichWidgets.  I need to take the value entered, format it and set another input field.  On a new record, I select a date for the next Month (i.e. Jun 1 2015) and my code is picking up Jun 14 2015 instead.  After I save the record, and do the same action I get what is expected (Jun 1 2015).



Has anyone had this happen before?  I use this component all the time and haven't seen this before.  Any ideas on how to resolve it?
2012-03-16 12-21-09
João Rosado
Staff
Hi Rebecca,

Are you able to replicate it in an example eSpace?

Regards,
João Rosado
2018-06-01 14-37-59
Rebecca Hall
I think what was happening is the "onchange" event of the input changed immediately when you clicked the arrow to go to a new month.  This was causing the ajax code to run before the user had clicked on the date from the calendar widget.  Looks like it might be a bug in the calendar widget because the event shouldn't fire until the user clicks on the date.
2012-03-16 12-21-09
João Rosado
Staff
Hi Rebecca,

Just a quick feedback on this topic, a college of mine was just doing a demo of a new application that he was working on and he was actually using that behavior on his application.

It was a dashboard application of employee productivity and it had 2 fields for start and end dates. In his application was actually expected to see the dashboard automatically respond while it was changing the months, to see the evolution while the time progressed.

Even a bug is someone else feature :)
Reminds me of this XKCD:

https://xkcd.com/1172/

Regards,
João Rosado
2018-06-01 14-37-59
Rebecca Hall
That is so true!  I ended up taking out the change event and make the users click a button.
2018-05-27 10-06-47
lnunes

Hi Rebecca,

On the Input Calendar widget there is a property "UpdateOnCloseOnly", set it to true.

Regards,

Luis

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.