Script Field - Date Time Picker always returns $datePickerFormatter.format($value)

code I have tried

def last_test_date = Date.parse("yyyy-MM-dd hh:mm:ss", "2014-04-03 1:23:45")

return last_test_date 


return "12-13-2017"

return "13-12-2017"

return "12/13/2017"

return "12/Dec/2017"


Nothing seems to work.

1 answer

1 accepted

Hi Mahek,

Which searcher are you using for this script field? Your first example (where you return a Date object) should work correctly, so long as you make sure that the searcher is set to 'Date Time Range picker'.



I don't get "Date Time Range Picker" as an option.

I am using "Date Time Picker" - Same result

Hi Mahek,

'Date Time Picker' is one of the available templates for a script field, but you also need to select the right searcher, which in this case is 'Date Time Range picker'. You can select the searcher as follows:

  1. Go to the Script Fields tab, where all of your script fields are listed.
  2. Locate the field you want to configure. In the left-hand column are listed the configuration scheme, the searcher, and the template (see first image below for an example).
  3. Click on the name of the searcher, and you will be taken to a page where you can edit the field's details (see second image).
  4. Select 'Date Time Range picker' from the 'Search Template' drop-down and submit the form.

Image 1

Screen Shot 2017-12-22 at 11.21.02.png

Image 2

Screen Shot 2017-12-22 at 11.18.43.png


That is the issue, the problem is fixed.

Thanks Jake. Appreciate the effort.

Hi Mahek,

I'm glad to hear that the problem is resolved. If you find this answer to be useful, please consider accepting it so that other users of Community who may be having the same issue as you will be able to see that there is a solution available.

Many thanks,


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,695 views 3 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you