0

5.0.5 datebox problem

asked 2010-11-10 02:24:32 +0800

apam gravatar image apam
24 1

Hi,
I tried to update from 5.0.4 to 5.0.5
but a datebox field change its behavior

<datebox id="dbGiorno" cols="20" format="dd/MM/yyyy" mold="rounded" constraint="no past"/>

when I click on the day number the onChange don't fire
but it fires where I click outside of datebox field ( lose focus )

Does the forum have info about problem with datedox on 5.0.5 ?

I searched on bug tracker but I did not find anything

Thank you

Giuseppe

delete flag offensive retag edit

18 Replies

Sort by ยป oldest newest

answered 2010-11-10 17:08:36 +0800

twiegand gravatar image twiegand
1807 3

Giuseppe,

It seems to me that the behavior change is the result of a bug fix and that 5.0.5 is now working correctly.

From an application perspective, I would think that it would be preferable for the "onChange" event to be fired when a user has changed a value, not when they are in the process of doing so (e.g. opening the calendar to choose a date).

If you want to capture when a user is in-process, you could try the "onClick" event which will capture when the user clicks in the date field (not the day number) or perhaps the "onFocus" event which will capture when the user clicks in the date field OR the day number.

Sorry I couldn't be of more help.

Todd

link publish delete flag offensive edit

answered 2010-11-11 05:25:03 +0800

apam gravatar image apam
24 1

Thank you Todd,

I will check the 5.0.5 datebox events behavior with a test program
to undertand wich one is best for my application

It is importart to know that 5.0.5 behavior is corrent and it isn't a bug and in the
future will be the same

Giuseppe

link publish delete flag offensive edit

answered 2010-11-11 17:25:17 +0800

pblakez gravatar image pblakez
9

Gidday Todd

I have the same problem, I have been using the onChange event to update other elements and datebox this will now only trigger the event when you actually leave the datebox field i.e. loose focus.

This is wrong in my opinion, the previous behaviour of when you click on the date you want and the month view closes should trigger the event

Currently the user must leave the datebox for the onChange event to trigger forcing the user to go back to the datebox again to try another date, quite baffling to my users, rolled it out yesterday and the phone has been running hot!

Is there a work around for this ?
Will you be changing this behaviour back ?


cheers pb...

link publish delete flag offensive edit

answered 2010-11-11 17:43:17 +0800

twiegand gravatar image twiegand
1807 3

PB,

Sorry, I don't work for the ZK team - I just try to help out where I can. Maybe one of the "official" members would care to comment?

Regards,

Todd

link publish delete flag offensive edit

answered 2010-11-11 18:06:41 +0800

Matze2 gravatar image Matze2
773 7

To me the 5.0.5 behavior seems more correct than before. It is now consistent with all the other input fields, where you need to leave the field to get the event.

Before 5.0.5, there were onChange events fired for each change in the calendar popup, e.g. when you increment the month 5 times. But setting up the calendar for a desired date, which may require more than one click, is similar to plain editing an input field, so onChanging would be more appropriate in my opinion.

link publish delete flag offensive edit

answered 2010-11-12 16:59:23 +0800

pblakez gravatar image pblakez
9

I changed to using Events.ON_CHANGING but the event never gets triggered ?

pb...

link publish delete flag offensive edit

answered 2010-11-12 17:44:25 +0800

Matze2 gravatar image Matze2
773 7

Sorry, I just said that it looks most appropriate to me, but I never used the onChanging event.

Still, I don't understand the use case. If a user wanted to select a certain date and did clicked on three different days in the calendar (because he missed the correct day twice), then you got three onChange events with 5.0.4.
What do you do with all these events?
Moreover, if a user decided not to use the calendar and did the changes in the text field, no onChange event was raised, even if the result of the editing was the same.

I had a use case where this onChange event really hit me and I am glad that this is consistent with all the other input fields now.

Try to file a feature request for onChanging if this is really not working for you.

link publish delete flag offensive edit

answered 2010-11-14 22:15:12 +0800

pblakez gravatar image pblakez
9

My use case is as follows

Form of payroll data is displayed below a Datebox
Date is selected in Datebox and the relevent payroll data is displayed below
The user needs to scan the data below and not necessarily interact with the form, which means the cursor may not leave the Datebox

Problem with I am having with 5.05 is that although the Datebox shows the new date selected, the data below is not updated, this confuses the user

It seems to me that Datebox should behave more like a Combobox where when the value changes the onChange event is thrown, not when the Datebox looses focus

see diff behaviour in these two videos
http://attainconsult.com/temp/zk_datebox_new_5.05_behaviour.mp4
http://attainconsult.com/temp/zk_datebox_org_behaviour.mp4


It may be a mismatch on editing styles in that the datebox allows text to be entered as well as providing a selection popup

I would be happy with a work around, currently I am going to stay on the previous version as this behaviour is too mistake prone IMO

cheers pb...

link publish delete flag offensive edit

answered 2010-11-15 02:08:40 +0800

Matze2 gravatar image Matze2
773 7

The use case is clear.
But if the user manually edits the datebox text field from 10/11 to 11/11 (without opening the calendar popup), nothing will happen in both cases.

link publish delete flag offensive edit

answered 2010-11-17 02:26:24 +0800

apam gravatar image apam
24 1

Hello,

I think that the datebox should behave like tha listbox, if you click on a item then event onChange
fire and when you click on a day then the onChange event fire

like 5.0.4

Giuseppe

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-11-10 02:24:32 +0800

Seen: 846 times

Last updated: Feb 14 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More