1. Tapestry
  2. TAPESTRY-1105

DropdownDatePicker.java uses wrong format to pass date value to DoJo


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.1
    • Component/s: JavaScript, tapestry-core
    • Labels:


      Line 85 of DropdownDatePicker.java:

      json.put("date", getTranslatedFieldSupport().format(this, getValue()));

      however, this generates these errors in the browser from DoJo:

      DEBUG: invalid date string: 10/02/06
      DEBUG: DEPRECATED: dojo.widget.DropdownDatePicker date attributes must be passed in Rfc3339 format – will be removed in version: 0.5

      This is because I defined a custom Translator for the field. It is picking up it's format string for the parse/validation phase, but the date value is the initial displayed value used when generating the text box, and needs to be in "yyyy-MM-dd" format.

      When changing this, don't use a static DateFormat, of course, as they aren't thread safe. Been bitten by that before - took a serious debug effort to track that one down. You can use an Object pool or ThreadLocal, however.


        Greg Woolsey created issue -
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Assignee Jesse Kuhnert [ jkuhnert ]
        Jesse Kuhnert made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 4.1.1 [ 12312021 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Mark Thomas made changes -
        Workflow jira [ 12386007 ] Default workflow, editable Closed status [ 12567898 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567898 ] jira [ 12591025 ]


          • Assignee:
            Jesse Kuhnert
            Greg Woolsey
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: