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

datebox showing "NaN"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Normal Normal
    • None
    • 5.0.5
    • Components
    • Server:
      OS: Windows / Linux
      AppServer: Tomcat 6.0.18

      Client:
      OS: Windows XP
      Browser: IE 6/7

      We encounter some unexpected experience in datebox component. Please see attachments datebox-nan-1.PNG and datebox-nan-2.PNG.
      In datebox-nan-1.PNG, the datebox was showing NaN. And by selecting a "NaN" date, we captured datebox-nan-2.PNG.
      The datebox cannot resume to normal behavior unless we reload the page. We cannot repeat it every time, it's an intermittent problem.

      We create the datebox in JSP and modify the datebox by JAVA class (by autowire). Please find the code fragment below.

      JSP:
      <zk:datebox id="completeDateDatebox" />

      JAVA:
      // completeDateDatebox is an instance of org.zkoss.zul.Datebox
      completeDateDatebox.setReadonly(true);
      completeDateDatebox.setFormat("dd/MM/yyyy");
      completeDateDatebox.setValue(aDomainObj.getCompleteDate());
      completeDateDatebox.addEventListener(Events.ONCHANGE, new EventListener() {
      public void onEvent(Event event) throws Exception

      { aDomainObj.setCompleteDate(completeDateDatebox.getValue()); }


      });
      completeDateDatebox.setConstraint("no empty: " + org.zkoss.util.resource.Labels.getLabel("error.completeDate.empty"));

        1. datebox-nan-1.PNG
          datebox-nan-1.PNG
          4 kB
        2. datebox-nan-2.PNG
          datebox-nan-2.PNG
          5 kB
        3. html.txt
          28 kB

            Unassigned Unassigned
            edwinusic edwinusic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: