Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to validate text field to have a date format

Srikanth September 21, 2021

Hi ,

I have a requirement where i need to enter the date in the format ( dd-mm-yy) in a text field ( not regular expression custom field) which should allow/validate only date in the specified format on the edit screen of the issue.

Could anyone help on the issue as this requirement is bit urgent.

Regards

Srikanth

2 answers

1 accepted

0 votes
Answer accepted
Ravi Sagar _Sparxsys_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2021

Hi @Srikanth 

Well I am sure you have a really good reason not using a date field instead but in case you want to validate it you would need an app like JMWE (for workflow) or ScriptRunner for Jira (workflow or behaviours).

In case you want to use ScriptRunner's behaviour then this script will give you some pointers.

I hope it helps.

Ravi

0 votes
Tim Nixon July 20, 2022

One problem with a date field (date-picker) is that it includes the time of 00:00:00 when exported or in our case viewed in Confluence. This causes the date to appear one day before the expected date (in Confluence). Basically to anything external a date-picker isn't an absolute date but rather relative.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.19.0
TAGS
AUG Leaders

Atlassian Community Events