Hi,
We have a date picker custom field. We need to set its default value as current date plus 10 days.
I have written a javascript code to set its value and tried to paste it in "createissue-details.jsp".
But it doesnot seem to work.
Please suggest how to use js code on create issue page in JIRA 6.1.6.
Thank you.
Hi,
it's not recommended to use javascript and modify the jsp, but you can do it, putting you script in the description of your custom field in the configuration fields of your issue type.
Look this link it can help you.
hi,
where you have put your script?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you zezeto for the reply.
Does it allow simple JS or only AJS can be used?
I am using the following code:
<script>
var endDate= document.getElementById("customfield_id");
if (endDate)
{
var today=new Date();
today.setDate(today.getDate()+10);
endDate.value=today;
}
</script>
Although it does't work.
But when I try it with browser(Firebug), it appear to work well.
Please suggest!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I have put the js code in Description of datePicker custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.