Datepicker import

Hello everybody, i try to add to my plugin datepicker functionality
kibana version: 5.5.2
node version 8.6.0
npm version 5.3.0
i try to use "jquery-datetimepicker": "^2.5.11":
first i install it, then i install jquery.
jquery version: 3.2.1

after in app.js i make import as:
var $ = require('jquery');
require('jquery-datetimepicker');

after in my controller i add rows:
$(document).ready(function(){
$('#datetimepicker').datetimepicker();
});

or only:
$('#datetimepicker').datetimepicker();

in html file i try to access to datepicker with:

bu in result i got exception:
TypeError: r is undefined (https://localhost:5601/twc/bundles/logtrail.bundle.js?v=8467:37727)

TypeError: r is undefined[Learn More] jquer:1
s/H.setOptions jquery.datetimepicker.full.min.js:1
datetimepickerFactory/e.fn.datetimepicker/< jquery.datetimepicker.full.min.js:1
each jquery.js:362
each jquery.js:157
datetimepickerFactory/e.fn.datetimepicker jquery.datetimepicker.full.min.js:1
[4824]/</< app.js:271
mightThrow jquery.js:3583
resolve/</process<

can anybody give some advice how to solve this problem?

Guys, any idea?)

There are community forums, if you would like an SLA I would suggest reaching out https://www.elastic.co/subscriptions

What does line 37727 in logtrain.bundle.js look like for where this error is coming from? I am not familar with the jquery-datetimepicker.

hello, thanks for response.
i found solution:
3rd party library need import as:
at first, you should install with npm, or add handle
then add next rows in your app.js depend librarries your need

import 'bootstrap/dist/css/bootstrap.css';
import 'angular-bootstrap-datetimepicker/src/css/datetimepicker.css';
import 'angular-bootstrap-datetimepicker/src/js/datetimepicker.js';
import 'angular-bootstrap-datetimepicker/src/js/datetimepicker.templates.js';

after:
const app = uiModules.get('app/your_plugin', ['ui.bootstrap.datetimepicker']);

thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.