cannot override browser default for date picker

Ngoc Tuan Lam October 9, 2017

I try to add an AUI date picker following this : 

https://docs.atlassian.com/aui/latest/docs/date-picker.html

 

I try to add 

AJS.$(document).ready(function() {
AJS.$('#demo-range-always').datePicker({'overrideBrowserDefault': true});
});

 

However , the it gets error when deploy : 

aui-datepicker.js:1619 Uncaught TypeError: Cannot read property 'msie' of undefined
at Datepicker._generateHTML (aui-datepicker.js:1619)
at Datepicker._updateDatepicker (aui-datepicker.js:730)
at Datepicker._inlineDatepicker (aui-datepicker.js:299)
at Datepicker._attachDatepicker (aui-datepicker.js:183)
at HTMLDivElement.<anonymous> (aui-datepicker.js:1855)
at Function.each (jquery-1.12.4.js:370)
at jQuery.fn.init.each (jquery-1.12.4.js:137)
at jQuery.fn.init.__601fc554d291439a8ef8bcac7fc51f19.$.fn.datepicker (aui-datepicker.js:1851)
at initCalendar (aui-datepicker.js:2036)
at aui-datepicker.js:2173

 

I also try to add in atlassian-plugin.xml

<web-resource key="date-picker" name="Date Picker">
<dependency>com.atlassian.auiplugin:aui-date-picker</dependency>
</web-resource>

 and in the velocity file

$webResourceManager.requireResource("com.adsk.jira.tryThis:date-picker")
<script src="//aui-cdn.atlassian.com/aui-adg/6.0.8/js/aui-experimental.js"></script>
<script src="//aui-cdn.atlassian.com/aui-adg/6.0.8/js/aui-datepicker.js"></script>

 

but no help.

 

1 answer

0 votes
Ngoc Tuan Lam October 12, 2017

anyone experience this before ????

Suggest an answer

Log in or Sign up to answer