Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-78027

The error "Invalid date format. Please enter the date in the format" is thrown when editing a Date Picker field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 9.12.0, 9.12.10, 9.12.11
    • Issue - Fields
    • None

      Issue Summary

      The Date Picker field type does not respect the date format configured in ⚙ > System > General Configuration > Advanced Settings > jira.date.picker.java.format (nor in ⚙ > System > Look and feel > Day/Month/Year Format)

      Whenever this field is edited in a Jira issue, the date format is always using the format 13/Aug/24. As result, when trying to submit the new date value, the error below is thrown

      Invalid date format. Please enter the date in the format XXXXXXX
      

      Environment

      This issue was observed in Jira Data Center 9.12.12, but we suspect that any Jira 9.x version might be impacted.

      Steps to replicate

      1. ⚙ > System > General Configuration > Advanced Settings
        • Set jira.date.picker.java.format to yyyy-MM-dd
      2. Create a new date picker field in ⚙ > Issues > Custom Fields
      3. Edit any Jira issue
      4. In the Edit Issue screen, scroll down to the date field, choose a date and click "confirm" from the calendar
      5. Click on the Update button from the Edit Issue screen to submit the update

      Expected behavior

      • After clicking the "confirm" from the calendar, the date format should respect the format configured in the Jira administration which is yyyy-MM-dd
      • No error should be thrown after clicking the Update button

      Observed behavior

      • After clicking the "confirm" from the calendar, the date format should respect the format configured in the Jira administration. Instead, it is using the format below:
        13/Aug/24
        
      • The error below is thrown after submitting the update:
        Invalid date format. Please enter the date in the format "yyyy-MM-dd".
        

      Workaround

      Workaround 1

      Revert the change made to ⚙ > System > General Configuration > Advanced Settings > jira.date.picker.java.format to use the default format

      Workaround 2

      Manually enter the date in the Date Picker field in the Edit Issue screen, using the format configured in jira.date.picker.java.format:

        1. Screenshot 2024-08-30 at 15.39.54.png
          127 kB
          Julien Rey
        2. Step1.png
          268 kB
          Julien Rey
        3. Observed.png
          428 kB
          Julien Rey
        4. Step2.png
          429 kB
          Julien Rey

              Unassigned Unassigned
              jrey Julien Rey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: