Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3262

Datebox trigger onChange and validation when clicking on the calendar buttons

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.3
    • 8.0.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.3 S7, ZK 8.0.3 S9

      When focus in on a Datebox input, and blur is triggered by clicking out, onChange / validate (if constraint) is triggered.
      This also happens while clicking on the datebox calendar.

      Considering the following workflow:
      A datebox with a "not null" constraint set from java using a constraint implementing the org.zkoss.zk.ui.Constraint interface.
      Click in the input field, then on the calendar button.
      In the calendar, click on a day button.
      Clicking the day causes onBlur on the input, which causes onChange and validation.
      Since an error message is shown on the datebox, click action is not performed, but the focus is lost from the datebox input. The next click doesn't trigger onBlur (since blur has already been performed) and the date selection is performed.

      Reproduce with attached example

            wenninghsu wenninghsu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h