Adding Datepicker in soy File missing something

I created a soy File with a datepicker in it and it works in Chrome but It won't work in any other browsers. I think I am not even able to use the aui-datepicker, Chrome just uses the browser default and all the other browser arent.

So I have added

<dependency>com.atlassian.auiplugin:aui-experimental-date-picker</dependency>

to my plugin.xaml in

<web-resource key="soy" name="AJS Soy">

Hope that the correct place.

<input class="aui-date-picker" id="vValidFrom" name="vValidFrom" type="date" placeholder="DD-MM-YYYY" data-aui-dp-uuid="0">

and i have

{template .javascript}

{literal}

AJS.$(document).ready(function() {
AJS.('#vValidFrom').datePicker({'overrideBrowserDefault': true});
});

{/literal}

{/template}

for the javascript.

FireFox and IE won't display a datepicker from my blueprint. The standart decision blueprint has a working datepicker in it. I guess that there is just a simple solution to this cause I really don't have a clue what I'm doing so if you could provide me with a little sample blueprint that handels a datepicker it would be great.

1 answer

hello,

 

try this in soy:

&lt;fieldset&gt;
 	    &lt;div class="field-group"&gt;
 	        &lt;label for="spLebenStart"&gt;{getText('sp.lebenslaufakte.datum')}&lt;span class="aui-icon icon-required"&gt;(required)&lt;/span&gt;&lt;/label&gt;
 	        &lt;input class="aui-date-picker" id="spLebenStart" type="date" name="spDateBegin"/&gt;
 	    &lt;/div&gt;
&lt;/fieldset&gt;

 

and in javascript file in post-render section:

AJS.$('#spLebenStart').datePicker({
        	overrideBrowserDefault: true,
            languageCode: 'de'
});

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

132 views 6 8
View post

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