Adding Datepicker in soy File missing something

Tom March 24, 2014

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

0 votes
vandyke January 22, 2016

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
TAGS
AUG Leaders

Atlassian Community Events